diff --git a/.github/actions/install-project/action.yml b/.github/actions/install-project/action.yml index 5f0ab406..d42a612d 100644 --- a/.github/actions/install-project/action.yml +++ b/.github/actions/install-project/action.yml @@ -4,8 +4,8 @@ inputs: python-version: required: true description: Python version to install - reference: - required: true + poetry-cache-id: + default: ${{ github.event.pull_request.id || github.event.after }} description: > Reference ID to use for defining poetry cache (e.g. pull request id or commit SHA) @@ -19,7 +19,7 @@ runs: uses: actions/cache@v3 with: path: ~/.local - key: ${{ runner.os }}-poetry-${{ inputs.reference }} + key: ${{ runner.os }}-poetry-${{ inputs.poetry-cache-id }} - name: Install Poetry uses: snok/install-poetry@v1 if: steps.cached-poetry.outputs.cache-hit != 'true' diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index afc3f278..9d4ca831 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -24,7 +24,6 @@ jobs: uses: ./.github/actions/install-project with: python-version: '3.11' - reference: ${{ github.event.pull_request.id || github.event.after }} # run python style checks - name: Poetry Lock Check @@ -50,7 +49,6 @@ jobs: - uses: ./.github/actions/install-project with: python-version: ${{ matrix.python-version }} - reference: ${{ github.event.pull_request.id || github.event.after }} test: runs-on: ubuntu-latest @@ -67,7 +65,6 @@ jobs: uses: ./.github/actions/install-project with: python-version: ${{ matrix.python-version }} - reference: ${{ github.event.pull_request.id || github.event.after }} - name: Test with pytest env: