improve ci #15
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: ci | |
on: | |
push: | |
branches: [main, master] | |
pull_request: | |
# If new code is pushed to a PR branch, then cancel in progress workflows for that PR. Ensures that | |
# we don't waste CI time | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
cancel-in-progress: true | |
jobs: | |
actionlint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Download actionlint | |
id: get_actionlint | |
run: bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash) | |
shell: bash | |
- name: Check workflow files | |
run: ${{ steps.get_actionlint.outputs.executable }} -color | |
shell: bash | |
python: | |
runs-on: ubuntu-latest | |
name: python | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
lfs: true | |
- name: Install uv | |
uses: astral-sh/setup-uv@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version-file: ".python-version" | |
- name: Install the project | |
run: uv sync --all-extras --locked | |
- name: pytest | |
run: uv run pytest | |
- name: mypy | |
run: uv run mypy . | |
- name: ruff check | |
run: uv run ruff check | |
- name: ruff format | |
run: uv run ruff format --check |