-
Notifications
You must be signed in to change notification settings - Fork 2
38 lines (35 loc) · 1.08 KB
/
javascript-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
name: Continuous testing
on: [pull_request]
jobs:
test:
strategy:
matrix:
command: [lint, build, test, "cli '.github/review-bot.yml'"]
runs-on: ubuntu-latest
name: running ${{ matrix.command }}
timeout-minutes: 5
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 22
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT
- name: Cache node modules
id: yarn-cache
uses: actions/cache@v4
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install dependencies
run: yarn install --immutable
- run: yarn run ${{ matrix.command }}
conclude:
runs-on: ubuntu-latest
name: All tests passed
needs: [test]
steps:
- run: echo '### Good job! All the tests passed 🚀' >> $GITHUB_STEP_SUMMARY