diff --git a/.github/workflows/check_nitypes.yml b/.github/workflows/check_nitypes.yml index 0b61127b..38373d35 100644 --- a/.github/workflows/check_nitypes.yml +++ b/.github/workflows/check_nitypes.yml @@ -26,20 +26,13 @@ jobs: poetry-version: ${{ env.POETRY_VERSION }} - name: Check for lock changes run: poetry check --lock - - name: Restore cached virtualenv - uses: actions/cache/restore@v4 - id: restore-nitypes + - name: Cache virtualenv + uses: actions/cache@v4 with: path: .venv key: nitypes-${{ runner.os }}-py${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('poetry.lock') }} - name: Install nitypes run: poetry install -v - - name: Save cached virtualenv - uses: actions/cache/save@v4 - if: steps.restore-nitypes.outputs.cache-hit != 'true' - with: - path: .venv - key: ${{ steps.restore-nitypes.outputs.cache-primary-key }} - name: Lint run: poetry run ni-python-styleguide lint - name: Mypy static analysis (Linux) diff --git a/.github/workflows/run_unit_tests.yml b/.github/workflows/run_unit_tests.yml index f9fedafd..e165cbf2 100644 --- a/.github/workflows/run_unit_tests.yml +++ b/.github/workflows/run_unit_tests.yml @@ -30,20 +30,13 @@ jobs: uses: Gr1N/setup-poetry@v9 with: poetry-version: ${{ env.POETRY_VERSION }} - - name: Restore cached virtualenv - uses: actions/cache/restore@v4 - id: restore-nitypes + - name: Cache virtualenv + uses: actions/cache@v4 with: path: .venv key: nitypes-${{ runner.os }}-py${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('poetry.lock') }} - name: Install nitypes run: poetry install -v - - name: Save cached virtualenv - uses: actions/cache/save@v4 - if: steps.restore-nitypes.outputs.cache-hit != 'true' - with: - path: .venv - key: ${{ steps.restore-nitypes.outputs.cache-primary-key }} - name: Run unit tests and code coverage run: poetry run pytest ./tests/unit -v --cov=nitypes --junitxml=test_results/nitypes-${{ matrix.os }}-py${{ matrix.python-version }}.xml - name: Upload test results