forked from compat-table/compat-table
-
Notifications
You must be signed in to change notification settings - Fork 33
45 lines (35 loc) · 1.1 KB
/
test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
name: Test and update
on:
schedule:
- cron: "37 6 * * *"
workflow_dispatch: {}
permissions:
contents: read
jobs:
test:
runs-on: ubuntu-latest
if: github.repository == 'williamkapke/node-compat-table'
permissions:
contents: write
steps:
- uses: actions/checkout@v3
- uses: ljharb/actions/node/install@main
- run: |
. $NVM_DIR/nvm.sh
echo "path=$(nvm cache dir)" >> "$GITHUB_OUTPUT"
id: nvm-path
- name: Restore nvm cache
uses: actions/cache/restore@v3
id: cache-nvm-restore
with:
path: ${{ steps.nvm-path.outputs.path }}
key: ${{ runner.os }}-nvm-${{ hashFiles('v8.versions') }}
restore-keys: ${{ runner.os }}-nvm-
- run: bash test.sh
# Remove nightlies so that the cache doesn't infinitely grow.
- run: rm -rf ${{ steps.nvm-path.outputs.path }}/*/*nightly*
- name: Save nvm cache
uses: actions/cache/save@v3
with:
path: ${{ steps.nvm-path.outputs.path }}
key: ${{ runner.os }}-nvm-${{ hashFiles('v8.versions') }}