File tree Expand file tree Collapse file tree 3 files changed +48
-8
lines changed Expand file tree Collapse file tree 3 files changed +48
-8
lines changed Original file line number Diff line number Diff line change
1
+ name : CI
2
+
3
+ on :
4
+ push :
5
+ pull_request_target :
6
+ types : [opened, synchronize, reopened]
7
+
8
+ concurrency :
9
+ group : ${{ github.workflow }}-${{ github.head_ref }}
10
+ cancel-in-progress : true
11
+
12
+ permissions : {}
13
+
14
+ defaults :
15
+ run :
16
+ shell : bash
17
+
18
+ jobs :
19
+ saucelabs :
20
+ runs-on : ubuntu-latest-4core
21
+ env :
22
+ SAUCE_USERNAME : ${{ vars.SAUCE_USERNAME }}
23
+ SAUCE_ACCESS_KEY : ${{ secrets.SAUCE_ACCESS_KEY }}
24
+ KARMA_PARALLEL_BROWSERS : 2
25
+ CI_NODE_INDEX : 0
26
+ CI_NODE_TOTAL : 1
27
+ CI_RUNNER_NUMBER : ${{ github.run_id }}
28
+ steps :
29
+ - name : Initialize environment
30
+ uses : angular/dev-infra/github-actions/npm/checkout-and-setup-node@ba9b4487ced515e5b4d87edd681a3bd9792444d6
31
+ with :
32
+ cache-node-modules : true
33
+ # Checking out the pull request commit is intended here as we need to run the changed code tests.
34
+ ref : ${{ github.event.pull_request.head.sha }}
35
+ - name : Install node modules
36
+ run : yarn install --frozen-lockfile
37
+ - name : Setup Bazel
38
+ uses : angular/dev-infra/github-actions/bazel/setup@ba9b4487ced515e5b4d87edd681a3bd9792444d6
39
+ - name : Run tests in Saucelabs
40
+ run : ./scripts/circleci/run-saucelabs-tests.sh
Original file line number Diff line number Diff line change @@ -29,8 +29,8 @@ rm ${tunnelFileName}
29
29
# Command arguments that will be passed to sauce-connect.
30
30
sauceArgs=" --readyfile ${tunnelReadyFile} --pidfile ${tunnelPidFile} "
31
31
32
- if [ ! -z " ${CIRCLE_BUILD_NUM } " ]; then
33
- sauceArgs=" ${sauceArgs} --tunnel-identifier angular-material-${CIRCLE_BUILD_NUM } -${CIRCLE_NODE_INDEX } "
32
+ if [ ! -z " ${CI_RUNNER_NUMBER } " ]; then
33
+ sauceArgs=" ${sauceArgs} --tunnel-identifier angular-material-${CI_RUNNER_NUMBER } -${CI_NODE_INDEX } "
34
34
fi
35
35
36
36
echo " Starting Sauce Connect in the background. Passed arguments: ${sauceArgs} "
Original file line number Diff line number Diff line change @@ -102,12 +102,12 @@ module.exports = config => {
102
102
} ,
103
103
} ) ;
104
104
105
- if ( process . env [ 'CIRCLECI ' ] ) {
106
- const containerInstanceIndex = Number ( process . env [ 'CIRCLE_NODE_INDEX ' ] ) ;
107
- const maxParallelContainerInstances = Number ( process . env [ 'CIRCLE_NODE_TOTAL ' ] ) ;
108
- const tunnelIdentifier = `angular-material-${ process . env [ 'CIRCLE_BUILD_NUM ' ] } -${ containerInstanceIndex } ` ;
109
- const buildIdentifier = `circleci -${ tunnelIdentifier } ` ;
110
- const testPlatform = process . env [ 'TEST_PLATFORM' ] ;
105
+ if ( process . env [ 'CI ' ] ) {
106
+ const containerInstanceIndex = Number ( process . env [ 'CI_NODE_INDEX ' ] ) || 0 ;
107
+ const maxParallelContainerInstances = Number ( process . env [ 'CI_NODE_TOTAL ' ] ) || 1 ;
108
+ const tunnelIdentifier = `angular-material-${ process . env [ 'CI_RUNNER_NUMBER ' ] } -${ containerInstanceIndex } ` ;
109
+ const buildIdentifier = `ci -${ tunnelIdentifier } ` ;
110
+ const testPlatform = 'saucelabs' ;
111
111
112
112
// This defines how often a given browser should be launched in the same CircleCI
113
113
// container. This is helpful if we want to shard tests across the same browser.
You can’t perform that action at this time.
0 commit comments