Skip to content

Commit

Permalink
ci: sparse checkout for action files in workflow (#20)
Browse files Browse the repository at this point in the history
* ci: checkout action to `setup-poetry-action` path

* ci: only sparse checkout `action.yaml` file in `test` job
  • Loading branch information
threeal authored Jan 24, 2024
1 parent 6138ca9 commit 86a0102
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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

Expand Down

0 comments on commit 86a0102

Please # to comment.