forked from nrwl/ci
-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (44 loc) · 2.9 KB
/
ci-integration-test-environment-variables.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
name: CI - integration test environment-variables input
on:
push:
branches:
- main
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.event.number || github.ref }}
cancel-in-progress: true
jobs:
main:
name: Nx Cloud - Main Job
uses: ./.github/workflows/nx-cloud-main.yml
secrets:
# We provide a fallback value here because we have no way to share the secrets namespace with contributor forks
NPM_TOKEN: ${{ secrets.SECRET_FOR_INTEGRATION_TEST || 'SOME_NOT_SO_SECRET_VALUE' }}
# NOTE: We cannot include these secrets in the integration tests otherwise they will interfere with the real connection to Nx Cloud
# NX_CLOUD_ACCESS_TOKEN: ${{ secrets.SECRET_FOR_INTEGRATION_TEST }}
# NX_CLOUD_AUTH_TOKEN: ${{ secrets.SECRET_FOR_INTEGRATION_TEST }}
with:
working-directory: ./integration-tests/npm
environment-variables: |
MY_BOOLEAN=true
CAPITAL_BOOLEAN =FALSE
SOME_NUMBER= 42
OTHER_TEXT = some other "text"
parallel-commands: |
node -e "if(process.env.SOME_NUMBER == 42) console.log('Number parsing successful'); else { throw new Error('Number parsing failed!');}"
node -e "if(process.env.MY_BOOLEAN == 'true') console.log('Boolean parsing successful'); else { throw new Error('Boolean parsing failed!');}"
node -e "if(process.env.CAPITAL_BOOLEAN == 'false') console.log('Capital boolean parsing successful'); else { throw new Error('Capital boolean parsing failed!');}"
node -e "if(process.env.OTHER_TEXT == 'some other \\"text\\"') console.log('Text parsing successful'); else { throw new Error('Text parsing failed!');}"
node -e "if(process.env.NPM_TOKEN == 'SOME_NOT_SO_SECRET_VALUE') console.log('NPM_TOKEN secret parsing successful'); else { throw new Error('NPM_TOKEN secret parsing failed!');}"
parallel-commands-on-agents: |
node -e "if(process.env.SOME_NUMBER == 42) console.log('Number parsing on agent successful'); else { throw new Error('Number parsing on agent failed!');}"
node -e "if(process.env.MY_BOOLEAN == 'true') console.log('Boolean parsing on agent successful'); else { throw new Error('Boolean parsing on agent failed!');}"
node -e "if(process.env.CAPITAL_BOOLEAN == 'false') console.log('Capital boolean parsing on agent successful'); else { throw new Error('Capital boolean parsing on agent failed!');}"
node -e "if(process.env.OTHER_TEXT == 'some other \\"text\\"') console.log('Text parsing on agent successful'); else { throw new Error('Text parsing on agent failed!');}"
node -e "if(process.env.NPM_TOKEN == 'SOME_NOT_SO_SECRET_VALUE') console.log('NPM_TOKEN secret parsing successful'); else { throw new Error('NPM_TOKEN secret parsing failed!');}"
agents:
name: Nx Cloud - Agents
uses: ./.github/workflows/nx-cloud-agents.yml
with:
working-directory: ./integration-tests/npm
number-of-agents: 3