-
Notifications
You must be signed in to change notification settings - Fork 56
49 lines (45 loc) · 1.25 KB
/
pr_workflow.yaml
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
name: PR Validator - Build and Test
on:
pull_request:
branches:
- main
paths-ignore:
- 'lerna.json'
- '**/package-lock.json'
- '**/package.json'
push:
branches:
- main
paths-ignore:
- 'lerna.json'
- '**/package-lock.json'
- '**/package.json'
jobs:
build-and-test:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: '20'
- name: Install project dependencies
run: |
echo "Starting npm ci with a 10-minute timeout"
for i in 1 2 3; do # Retry logic, retry 3 times
timeout 10m npm ci --verbose && break || echo "npm ci failed, retrying ($i/3)..."
done
- name: Run linter
run: npm run lint:fix
- name: Run Tests
run: npm run test:ci
env:
TWILIO_ACCOUNT_SID: ${{ secrets.TWILIO_ACCOUNT_SID_linux }}
TWILIO_AUTH_TOKEN: ${{ secrets.TWILIO_AUTH_TOKEN_linux }}
NODE_OPTIONS: --no-experimental-fetch
CI: ""
- name: Build packages
run: npm run build
- name: Codecov report
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}