From a3de45a1541298be918a4cac0d2aba9b2953ca66 Mon Sep 17 00:00:00 2001 From: teddygroves Date: Fri, 16 Aug 2024 15:10:12 +0200 Subject: [PATCH] run pre-commit checks in tests action --- .../{run_pytest.yml => run_tests.yml} | 24 +++++++++++++------ 1 file changed, 17 insertions(+), 7 deletions(-) rename .github/workflows/{run_pytest.yml => run_tests.yml} (50%) diff --git a/.github/workflows/run_pytest.yml b/.github/workflows/run_tests.yml similarity index 50% rename from .github/workflows/run_pytest.yml rename to .github/workflows/run_tests.yml index 87f4cd9..5cb5797 100644 --- a/.github/workflows/run_pytest.yml +++ b/.github/workflows/run_tests.yml @@ -17,16 +17,26 @@ jobs: strategy: matrix: os: [ubuntu-latest, windows-latest] + python-version: [3.12] steps: - - uses: actions/checkout@v2 - - name: Set up Python 3.12 + + - name: checkout code + uses: actions/checkout@v2 + + - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v2 with: - python-version: 3.12 - - name: Install enzax - run: pip install -e .[test] - - name: Run pytest - run: python -m pytest --cov=src/enzax + python-version: ${{ matrix.python-version }} + + - name: Install pdm + run: pip install pdm + + - name: pre-commit checks + uses: pre-commit/action@v2.0.3 + + - name: Run tests + run: pdm run pytest tests --cov=src/enzax + - name: Upload coverage reports to Codecov uses: codecov/codecov-action@v3