tms 92: project setup readme #37
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: CICD | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
jobs: | |
CI: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ["3.10", "3.11", "3.12"] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Cache pre-commit environment | |
uses: actions/cache@v4 | |
with: | |
path: | | |
~/.cache/pre-commit | |
./.pre-commit | |
key: ${{ runner.os }}-precommit-${{ hashFiles('.pre-commit-config.yaml') }}-${{ matrix.python-version }} | |
restore-keys: | | |
${{ runner.os }}-precommit-${{ matrix.python-version }}- | |
${{ runner.os }}-precommit- | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install ".[test]" | |
- name: Run pre-commit hooks | |
run: pre-commit run --all-files | |
- name: Run pre-push hooks | |
run: pre-commit run --all-files --hook-stage pre-push | |
- name: Run pytest | |
run: pytest |