Speed up CI, add more checks (#115)

- Split pytest and end-to-end tests into separate jobs
- Add poetry check to ensure pyproject.toml and poetry.lock are in sync
- Add ruff format --diff to ensure style formatting is applied (fails if ruff would reformat anything)
This commit is contained in:
Simon Alibert
2024-04-29 23:05:55 +02:00
committed by GitHub
parent 1ec5f77f7c
commit 2765877f28
9 changed files with 88 additions and 21 deletions

View File

@@ -1,6 +1,6 @@
# Inspired by
# https://github.com/huggingface/peft/blob/main/.github/workflows/test-docker-build.yml
name: Test Docker builds (PR)
name: Test Dockerfiles
on:
pull_request:
@@ -15,7 +15,7 @@ env:
jobs:
get_changed_files:
name: "Get all modified Dockerfiles"
name: Detect modified Dockerfiles
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
@@ -40,7 +40,7 @@ jobs:
build_modified_dockerfiles:
name: "Build all modified Docker images"
name: Build modified Docker images
needs: get_changed_files
runs-on: ubuntu-latest
if: ${{ needs.get_changed_files.outputs.matrix }} != ''