Skip to content

Commit 3d582f5

Browse files
sypharJoshua Nelson
authored and
Joshua Nelson
committed
CI: switch from cache to artifacts for caching test binaries across jobs
1 parent 5bed132 commit 3d582f5

File tree

1 file changed

+13
-10
lines changed

1 file changed

+13
-10
lines changed

.github/workflows/ci.yml

+13-10
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,12 @@ jobs:
3535
-executable -type f \
3636
-exec cp {} ./test-binaries/ \;
3737
38-
- name: set up test binaries to cache
39-
uses: actions/cache@v2
38+
- uses: actions/upload-artifact@v2
39+
name: set up test binaries to cache
4040
with:
41-
path: "./test-binaries"
42-
key: test-binaries-${{ github.sha }}
41+
name: test-binaries-${{ github.sha }}
42+
path: ./test-binaries/
43+
retention-days: 1
4344

4445
test:
4546
runs-on: ubuntu-latest
@@ -48,10 +49,10 @@ jobs:
4849
- uses: actions/checkout@master
4950

5051
- name: get test binaries from cache
51-
uses: actions/cache@v2
52+
uses: actions/download-artifact@v2
5253
with:
53-
path: "./test-binaries"
54-
key: test-binaries-${{ github.sha }}
54+
name: test-binaries-${{ github.sha }}
55+
path: ./test-binaries/
5556

5657
- name: Launch postgres and min.io
5758
run: |
@@ -69,6 +70,7 @@ jobs:
6970
run: |
7071
for f in ./test-binaries/*; do
7172
echo "running $f"
73+
chmod +x $f # GH action artifacts don't handle permissions
7274
$f || exit 1
7375
done
7476
@@ -83,10 +85,10 @@ jobs:
8385
- uses: actions/checkout@master
8486

8587
- name: get test binaries from cache
86-
uses: actions/cache@v2
88+
uses: actions/download-artifact@v2
8789
with:
88-
path: "./test-binaries"
89-
key: test-binaries-${{ github.sha }}
90+
name: test-binaries-${{ github.sha }}
91+
path: ./test-binaries/
9092

9193
- name: Launch postgres and min.io
9294
run: |
@@ -106,6 +108,7 @@ jobs:
106108
run: |
107109
for f in ./test-binaries/*; do
108110
echo "running $f"
111+
chmod +x $f # GH action artifacts don't handle permissions
109112
$f --ignored || exit 1
110113
done
111114

0 commit comments

Comments
 (0)