From 86a010209da84471d88c4f2950ca085e7ad0d1d2 Mon Sep 17 00:00:00 2001 From: Alfi Maulana Date: Wed, 24 Jan 2024 21:59:56 +0700 Subject: [PATCH] ci: sparse checkout for action files in workflow (#20) * ci: checkout action to `setup-poetry-action` path * ci: only sparse checkout `action.yaml` file in `test` job --- .github/workflows/ci.yaml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 0d1eb26..e6dd04c 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -15,13 +15,16 @@ jobs: steps: - name: Checkout uses: actions/checkout@v4.1.1 + with: + path: setup-poetry-action + sparse-checkout: action.yaml - name: Poetry should not be available shell: bash run: "! which poetry" - name: Setup Poetry with caching - uses: ./ + uses: ./setup-poetry-action - name: Poetry should be available shell: bash @@ -32,7 +35,7 @@ jobs: run: test "$(poetry --version)" == 'Poetry (version ${{ vars.POETRY_LATEST_VERSION }})' - name: Setup Poetry with a specific version - uses: ./ + uses: ./setup-poetry-action with: version: 1.5.1 cache: false @@ -42,7 +45,7 @@ jobs: run: test "$(poetry --version)" == 'Poetry (version 1.5.1)' - name: Setup Poetry - uses: ./ + uses: ./setup-poetry-action with: cache: false