diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 6a89767..4a3750b 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -15,8 +15,8 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu-latest] #, windows-latest, macos-latest] - python-version: ["3.10"] #, "3.11", "3.12"] + os: [ubuntu-latest, windows-latest, macos-latest] + python-version: ["3.10", "3.11", "3.12"] steps: - uses: actions/checkout@v4 @@ -24,28 +24,22 @@ jobs: uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - cache: "pip" # caching pip dependencies + cache: "poetry" - name: Configure poetry run: | python -m pip install --upgrade pip python -m pip install poetry - python -m poetry config virtualenvs.in-project true - - name: Cache the virtualenv - uses: actions/cache@v4 - with: - path: ./.venv - key: ${{ matrix.os }}-${{matrix.python-version}}-venv-${{ hashFiles('**/poetry.lock') }} - name: Install dependencies run: | python -m poetry install - - name: Test with pytest + - name: Test with pytest and create coverage report run: | python -m poetry run coverage run --source=panoptica -m pytest python -m poetry run coverage xml - - name: Upload results to Codecov + - name: Upload coverage results to Codecov (Only on merge to main) # Only upload to Codecov after a merge to the main branch - # if: github.ref == 'refs/heads/main' && github.event_name == 'push' + if: github.ref == 'refs/heads/main' && github.event_name == 'push' uses: codecov/codecov-action@v4 with: token: ${{ secrets.CODECOV_TOKEN }}