build: speed up Makefile installs with marker file\nci: cache ruff; k… #8
This file contains hidden or 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: [ dev ] | |
| pull_request: | |
| branches: [ dev ] | |
| permissions: | |
| contents: read | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python-version: [ '3.11', '3.12', '3.13' ] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Cache pip | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.cache/pip | |
| key: ${{ runner.os }}-pip-${{ matrix.python-version }}-${{ hashFiles('requirements.txt') }} | |
| restore-keys: | | |
| ${{ runner.os }}-pip-${{ matrix.python-version }}- | |
| - name: Cache venv | |
| uses: actions/cache@v4 | |
| with: | |
| path: venv | |
| key: ${{ runner.os }}-venv-${{ matrix.python-version }}-${{ hashFiles('requirements.txt') }} | |
| - name: Cache ruff | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.cache/ruff | |
| key: ${{ runner.os }}-ruff-${{ matrix.python-version }}-${{ hashFiles('**/*.py') }} | |
| - name: Install make | |
| run: sudo apt-get update && sudo apt-get install -y make | |
| - name: Lint | |
| run: make lint | |
| - name: Test | |
| run: make test |