-
Notifications
You must be signed in to change notification settings - Fork 103
76 lines (72 loc) · 2.94 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
66
67
68
69
70
71
72
73
74
75
76
# runs ut and nuts for SDR, plus the nuts from plugin-deploy-retrieve
name: tests
on:
push:
branches-ignore: [main]
workflow_dispatch:
jobs:
yarn-lockfile-check:
uses: salesforcecli/github-workflows/.github/workflows/lockFileCheck.yml@main
# Since the Windows unit tests take much longer, we run the linux unit tests first and then run the windows unit tests in parallel with NUTs
linux-unit-tests:
needs: yarn-lockfile-check
uses: salesforcecli/github-workflows/.github/workflows/unitTestsLinux.yml@main
windows-unit-tests:
needs: linux-unit-tests
uses: salesforcecli/github-workflows/.github/workflows/unitTestsWindows.yml@main
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
nuts:
needs: linux-unit-tests
uses: salesforcecli/github-workflows/.github/workflows/nut.yml@main
secrets: inherit
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
fail-fast: false
with:
os: ${{ matrix.os }}
xNuts-pdr:
needs: linux-unit-tests
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
command:
- 'yarn test:nuts:convert'
- 'yarn test:nuts:deb'
- 'yarn test:nuts:delete'
- 'yarn test:nuts:deploy'
- 'yarn test:nuts:deploy:metadata:manifest'
- 'yarn test:nuts:deploy:metadata:metadata'
- 'yarn test:nuts:deploy:metadata:metadata-dir'
- 'yarn test:nuts:deploy:metadata:source-dir'
- 'yarn test:nuts:deploy:metadata:test-level'
- 'yarn test:nuts:destructive'
- 'yarn test:nuts:manifest'
- 'yarn test:nuts:retrieve'
- 'yarn test:nuts:specialTypes'
- 'yarn test:nuts:static'
- 'yarn test:nuts:tracking'
uses: salesforcecli/github-workflows/.github/workflows/externalNut.yml@main
with:
packageName: '@salesforce/source-deploy-retrieve'
externalProjectGitUrl: 'https://github.com/salesforcecli/plugin-deploy-retrieve'
command: ${{matrix.command}}
preBuildCommands: 'shx rm -rf node_modules/@salesforce/kit; shx rm -rf node_modules/@typescript-eslint; shx rm -rf node_modules/eslint-plugin-header; shx rm -rf node_modules/eslint-plugin-import; shx rm -rf node_modules/eslint-plugin-jsdoc; shx rm -rf node_modules/eslint-plugin-prettier'
postbuildCommands: 'cp src/registry/metadataRegistry.json lib/src/registry'
preExternalBuildCommands: 'shx rm -rf node_modules/@salesforce/source-tracking/node_modules/@salesforce/source-deploy-retrieve'
os: ${{matrix.os}}
useCache: false
secrets: inherit