Skip to content

Commit

Permalink
Utilize newly introduced [1] sparse-checkout option
Browse files Browse the repository at this point in the history
I am admittedly a little unsure why files in leading directories,
including the root directory, aren't included. I feel like, based on how
I read the docs, that they should be included, but I'm glad that they're
not.

[1] actions/checkout#1369
  • Loading branch information
badeball committed Jun 10, 2023
1 parent 3c4f85d commit 0844937
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/examples-branch.yml
Expand Up @@ -78,7 +78,13 @@ jobs:
apt-get update
apt-get install -y --no-install-recommends ca-certificates
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v3.5.3
with:
sparse-checkout: examples/${{ matrix.example }}
- name: Sparse checkout sanity check
run: |
[ ! -f package.json ]
[ ! -f package-lock.json ]
- name: Cache NPM modules
uses: actions/cache@v3
with:
Expand All @@ -89,12 +95,6 @@ jobs:
with:
path: ~/.cache/Cypress
key: cypress-examples
# In lack of native support, https://github.com/actions/checkout/issues/172.
- name: Make checkout sparse
run: |
shopt -s extglob
rm -rf examples/!(${{ matrix.example }})
rm -rf !(examples)
- name: Retrieve dirty build
uses: actions/download-artifact@v3
with:
Expand Down

0 comments on commit 0844937

Please sign in to comment.