-
Notifications
You must be signed in to change notification settings - Fork 48
46 lines (44 loc) · 1.27 KB
/
unitTests.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
46
name: Unit Tests
on:
push:
branches-ignore: [main]
workflow_dispatch:
workflow_call:
inputs:
branch:
type: string
required: false
jobs:
unit-tests:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest, windows-latest, ubuntu-latest]
nodeVersion: [lts/-1, lts/*]
fail-fast: false
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
cache: yarn
- uses: google/wireit@setup-github-actions-caching/v1
- name: Cache node modules
id: cache-nodemodules
uses: actions/cache@v3
env:
cache-name: cache-node-modules
with:
path: "**/node_modules"
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/yarn.lock') }}
- uses: salesforcecli/github-workflows/.github/actions/yarnInstallWithRetries@main
if: ${{ steps.cache-nodemodules.outputs.cache-hit != 'true' }}
- run: yarn build
- uses: nick-fields/retry@943e742917ac94714d2f408a0e8320f2d1fcafcd
env:
SF_DISABLE_TELEMETRY: true
name: yarn test
with:
max_attempts: 2
command: yarn test
timeout_minutes: 60