-
Notifications
You must be signed in to change notification settings - Fork 142
54 lines (45 loc) · 1.15 KB
/
build-and-test.yml
File metadata and controls
54 lines (45 loc) · 1.15 KB
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
46
47
48
49
50
51
52
53
54
name: Build and Test
on:
pull_request:
types: [opened, synchronize]
push:
branches:
- main
concurrency:
group: build-and-test-${{ github.head_ref || github.ref_name }}
cancel-in-progress: true
jobs:
build-and-test:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: '24'
cache: 'yarn'
- name: Install dependencies
run: |
yarn install --immutable
- name: Run lint
if: ${{ success() }}
run: |
yarn lint
- name: Run build
if: ${{ success() }}
run: |
yarn build
- name: Run test
if: ${{ success() }}
timeout-minutes: 15
run: |
yarn test --forceExit --runInBand || {
if [ -f "./test-results/junit-report.xml" ]; then
echo "Tests failed. Retrying failed tests..."
node scripts/failed-test-retry.js
else
echo "Tests failed and no JUnit report found."
exit 1
fi
}