32 lines
944 B
YAML
32 lines
944 B
YAML
name: Model checks
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
pull_request:
|
|
|
|
jobs:
|
|
lint:
|
|
runs-on: docker
|
|
container:
|
|
image: python:3.11-slim-bookworm
|
|
steps:
|
|
- name: Setup environment
|
|
run: |
|
|
apt-get update && apt-get install --yes --no-install-recommends git make patch curl
|
|
- name: Install uv
|
|
run: curl -LsSf https://astral.sh/uv/install.sh | sh
|
|
# click version is temporary fix for https://github.com/pypa/hatch/issues/2050
|
|
# python -m pip install hatch
|
|
- name: Install hatch
|
|
run: uv tool install hatch --with 'click <8.3'
|
|
|
|
- name: Checkout
|
|
run: |
|
|
git clone "$(echo ${GITHUB_SERVER_URL} | cut -d : -f1)://${GITHUB_TOKEN}:@$(echo ${GITHUB_SERVER_URL} | cut -d / -f3-)/${GITHUB_REPOSITORY}.git" .
|
|
git checkout "${GITHUB_HEAD_REF:-${GITHUB_REF_NAME}}"
|
|
|
|
- name: Run checks
|
|
run: |
|
|
hatch run check:models
|