-
Notifications
You must be signed in to change notification settings - Fork 9
69 lines (59 loc) · 2.25 KB
/
unitTestsLinux.yml
File metadata and controls
69 lines (59 loc) · 2.25 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
64
65
66
67
68
69
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' }}
# This is a temporary workaround to ensure wireit is >= 0.14.12
# Once all plugins/libraries that use this workflow are updated, this can be removed
# See: https://github.com/google/wireit/issues/1297#issuecomment-2794737569
- name: Install wireit
run: yarn add wireit@^0.14.12
- run: yarn build
- name: yarn test
uses: salesforcecli/github-workflows/.github/actions/retry@main
with:
command: yarn test
env:
SF_DISABLE_TELEMETRY: true