-
Notifications
You must be signed in to change notification settings - Fork 58
65 lines (63 loc) · 2.05 KB
/
test.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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
name: Tests
on:
push:
branches-ignore: [main]
workflow_dispatch:
jobs:
linux-unit-tests:
uses: ./.github/workflows/unitTestsLinux.yml
windows-unit-tests:
uses: ./.github/workflows/unitTestsWindows.yml
test-bundle:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: lts/*
cache: yarn
- uses: salesforcecli/github-workflows/.github/actions/yarnInstallWithRetries@main
- name: Build the project
run: yarn build
- name: check if bundling runs into failures
run: node scripts/testEsbuild.js
external-test:
name: run tests in plugin-templates
runs-on: 'ubuntu-latest'
steps:
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: 'lts/*'
- name: Install CLI
uses: salesforcecli/github-workflows/.github/actions/retry@main
with:
max_attempts: 3
command: npm install -g @salesforce/cli@nightly shx yarn-deduplicate --omit=dev
timeout_minutes: 20
- name: Checkout to external project
uses: actions/checkout@v4
with:
repository: 'salesforcecli/plugin-templates'
- name: Swap dependency
run: |
yarn install --network-timeout 600000
yarn remove @salesforce/templates
yarn add forcedotcom/salesforcedx-templates#${{ github.sha }}
npx yarn-deduplicate
yarn install --network-timeout 600000
- name: install/build @salesforce/templates in node_modules
working-directory: node_modules/@salesforce/templates
run: |
yarn add husky --dev
yarn husky install
yarn install --network-timeout 600000
yarn build
- name: Build the external project (where the tests are)
run: yarn build
- name: Run tests
uses: salesforcecli/github-workflows/.github/actions/retry@main
with:
max_attempts: 3
command: yarn test:nuts
retry_on: error