ci: add caching for setup-staq action #73
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: CI | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
jobs: | |
pytest: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ["3.10", "3.11", "3.12"] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Staq | |
uses: ./.github/actions/setup-staq | |
- name: Setup Python ${{ matrix.python-version }} with uv | |
uses: ./.github/actions/setup-python-with-uv | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Lint | |
run: uv run ruff check --output-format=github . | |
- name: Format | |
run: uv run ruff format . --check --diff | |
- name: Check Python types | |
run: uv run mypy | |
- name: Run Pytest if directory exists | |
run: | | |
if [ -d "./tests/" ]; then | |
uv run pytest -s | |
fi | |
- name: Upload coverage to Codecov | |
if: matrix.python-version == '3.12' | |
uses: codecov/codecov-action@v5 | |
with: | |
files: ./coverage.xml | |
token: ${{ secrets.CODECOV_TOKEN }} | |
slug: oqtopus-team/tranqu |