Skip to content

Commit 0844937

Browse files
committed
Utilize newly introduced [1] sparse-checkout option
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
1 parent 3c4f85d commit 0844937

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

.github/workflows/examples-branch.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,13 @@ jobs:
7878
apt-get update
7979
apt-get install -y --no-install-recommends ca-certificates
8080
- name: Checkout
81-
uses: actions/checkout@v3
81+
uses: actions/[email protected]
82+
with:
83+
sparse-checkout: examples/${{ matrix.example }}
84+
- name: Sparse checkout sanity check
85+
run: |
86+
[ ! -f package.json ]
87+
[ ! -f package-lock.json ]
8288
- name: Cache NPM modules
8389
uses: actions/cache@v3
8490
with:
@@ -89,12 +95,6 @@ jobs:
8995
with:
9096
path: ~/.cache/Cypress
9197
key: cypress-examples
92-
# In lack of native support, https://github.com/actions/checkout/issues/172.
93-
- name: Make checkout sparse
94-
run: |
95-
shopt -s extglob
96-
rm -rf examples/!(${{ matrix.example }})
97-
rm -rf !(examples)
9898
- name: Retrieve dirty build
9999
uses: actions/download-artifact@v3
100100
with:

0 commit comments

Comments
 (0)