File tree 3 files changed +48
-16
lines changed
3 files changed +48
-16
lines changed Original file line number Diff line number Diff line change 1
1
on :
2
+ pull_request :
3
+ push :
4
+ branches :
5
+ - main
2
6
workflow_dispatch :
3
7
schedule :
4
8
- cron : ' 46 * * * *'
@@ -20,10 +24,22 @@ jobs:
20
24
steps :
21
25
- name : Check out repository code
22
26
uses : actions/checkout@v4
27
+ - name : Restore cached ucm release
28
+ id : restore-cached-ucm
29
+ uses : actions/cache/restore@v4
30
+ with :
31
+ path : |
32
+ /opt/unisonlanguage
33
+ /usr/local/bin/ucm
34
+ key : ${{ runner.os }}-ucm-${{ matrix.ucm-release-version }}
35
+ - name : Install ucm
36
+ if : steps.restore-cached-ucm.outputs.cache-hit != 'true'
37
+ env :
38
+ UCM_RELEASE : ${{ matrix.ucm-release-version }}
39
+ run : ./install-ucm.sh
23
40
- name : Run tests
24
41
env :
25
42
CLOUD_CLIENT_VERSION : ${{ matrix.cloud-client-version }}
26
- UCM_RELEASE : ${{ matrix.ucm-release-version }}
27
43
UNISON_CLOUD_ACCESS_TOKEN : ${{ secrets.CLOUD_USER_ACCESS_TOKEN }}
28
44
UNISON_DEBUG : timing
29
45
run : |
49
65
}
50
66
env :
51
67
SLACK_BOT_TOKEN : ${{ secrets.SLACK_BOT_TOKEN }}
68
+ - name : Cache ucm release
69
+ if : ${{ !cancelled() && steps.restore-cached-ucm.outputs.cache-hit != 'true' && startsWith(matrix.ucm-release-version, 'release') }}
70
+ id : save-ucm-to-cache
71
+ uses : actions/cache/save@v4
72
+ with :
73
+ path : |
74
+ /opt/unisonlanguage
75
+ /usr/local/bin/ucm
76
+ key : ${{ steps.restore-cached-ucm.outputs.cache-primary-key }}
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+
3
+ set -euxo pipefail
4
+
5
+ release_file_name () {
6
+ case " $UCM_RELEASE " in
7
+ " release%2F0.5.25" | " release%2F0.5.26" | " release%2F0.5.27" )
8
+ echo " ucm-linux.tar.gz"
9
+ ;;
10
+ * )
11
+ echo " ucm-linux-x64.tar.gz"
12
+ ;;
13
+ esac
14
+ }
15
+
16
+ mkdir -p /opt/unisonlanguage
17
+
18
+ curl --fail-with-body -L " https://github.com/unisonweb/unison/releases/download/${UCM_RELEASE} /$( release_file_name) " | tar -xz -C /opt/unisonlanguage
19
+
20
+ ln -s /opt/unisonlanguage/ucm /usr/local/bin/ucm
Original file line number Diff line number Diff line change 1
- #! /bin/bash
1
+ #! /usr/ bin/env bash
2
2
3
3
set -euxo pipefail
4
4
5
- release_file_name () {
6
- case " $UCM_RELEASE " in
7
- " release%2F0.5.25" | " release%2F0.5.26" | " release%2F0.5.27" )
8
- echo " ucm-linux.tar.gz"
9
- ;;
10
- * )
11
- echo " ucm-linux-x64.tar.gz"
12
- ;;
13
- esac
14
- }
15
-
16
- curl --fail-with-body -L " https://github.com/unisonweb/unison/releases/download/${UCM_RELEASE} /$( release_file_name) " | tar -xz
17
-
18
5
envsubst < cloud-tests.tpl.md > cloud-tests.md
19
6
20
7
exit_status=0
21
8
22
- ./ ucm transcript cloud-tests.md || exit_status=$?
9
+ ucm transcript cloud-tests.md || exit_status=$?
23
10
cat cloud-tests.output.md
24
11
25
12
exit " $exit_status "
You can’t perform that action at this time.
0 commit comments