fs2 update #284
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Lint Python Code | |
on: | |
# Trigger the workflow on push to master or any pull request | |
push: | |
pull_request: | |
branches: | |
- main | |
jobs: | |
lock_file: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ./.github/actions/setup | |
- run: uv lock --locked | |
linting: | |
runs-on: ubuntu-latest | |
needs: [lock_file] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ./.github/actions/setup | |
- run: uvx ruff check . | |
formatting: | |
runs-on: ubuntu-latest | |
needs: [lock_file] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ./.github/actions/setup | |
- run: uvx ruff check --select I . | |
- run: uvx ruff format --check . | |
type_consistency: | |
runs-on: ubuntu-latest | |
needs: [lock_file] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ./.github/actions/setup | |
- run: uvx mypy --install-types --non-interactive . | |
tests: | |
runs-on: ubuntu-latest | |
needs: [lock_file] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ./.github/actions/setup | |
- run: uv run --extra cpu pytest -s -v tests/unit_tests/ | |
build: | |
runs-on: ubuntu-latest | |
needs: [lock_file, linting, formatting, type_consistency, tests] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ./.github/actions/setup | |
- run: uv build |