-
Notifications
You must be signed in to change notification settings - Fork 9
63 lines (54 loc) · 1.94 KB
/
unitTestsLinux.yml
File metadata and controls
63 lines (54 loc) · 1.94 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
55
56
57
58
59
60
61
62
63
on:
workflow_call:
inputs:
skipTsDepCheck:
type: boolean
required: false
default: false
description: skip `prevent-typescript-dependency`. Use it for devDeps that ship TS
jobs:
determine-node-versions:
outputs:
nodeVersions: ${{ steps.determine-node-versions.outputs.nodeVersions }}
runs-on: ubuntu-latest
steps:
- uses: salesforcecli/github-workflows/.github/actions/determineNodeVersions@main
id: determine-node-versions
with:
nodeVersionOverride: ${{ vars.NODE_VERSION_OVERRIDE }} # default is 'lts/*'
nodeDisableVersions: ${{ vars.NODE_DISABLE_VERSIONS }}
prevent-typescript-dependency:
if: ${{ inputs.skipTsDepCheck == false }}
uses: salesforcecli/github-workflows/.github/workflows/preventTypescriptDep.yml@main
linux-unit-tests:
needs: determine-node-versions
strategy:
matrix:
node_version: ${{ fromJSON(needs.determine-node-versions.outputs.nodeVersions) }}
fail-fast: false
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node_version }}
cache: yarn
- uses: google/wireit@setup-github-actions-caching/v2
continue-on-error: true
- name: Cache node modules
id: cache-nodemodules
uses: actions/cache@v4
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
- name: yarn test
uses: salesforcecli/github-workflows/.github/actions/retry@main
with:
command: yarn test
env:
SF_DISABLE_TELEMETRY: true