Skip to content

Commit 74d3370

Browse files
committed
ci: using Github workflow actions
ci: pass Sauce credentials to the environment ci: fix tunnelIdentifier ci: use saucelabs/sauce-connect-action ci: pass credentials to karma-sauce-launcher
1 parent 533971c commit 74d3370

2 files changed

Lines changed: 46 additions & 7 deletions

File tree

.github/workflows/main.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Checks
2+
3+
on: [push]
4+
5+
jobs:
6+
test-mocha:
7+
runs-on: ubuntu-latest
8+
9+
strategy:
10+
matrix:
11+
node-version: [10.x, 12.x, 14.x]
12+
13+
steps:
14+
- uses: actions/checkout@v2
15+
name: Use Node.js ${{ matrix.node-version }}
16+
- uses: actions/setup-node@v2
17+
with:
18+
node-version: ${{ matrix.node-version }}
19+
- run: yarn install --frozen-lockfile
20+
- run: yarn run test:mocha
21+
22+
test-karma:
23+
runs-on: ubuntu-latest
24+
env:
25+
CI_MODE: saucelabs
26+
SAUCE_USERNAME: ${{ secrets.SAUCE_USERNAME }}
27+
SAUCE_ACCESS_KEY: ${{ secrets.SAUCE_ACCESS_KEY }}
28+
29+
steps:
30+
- uses: actions/checkout@v2
31+
name: Use latest Node.js version
32+
- uses: saucelabs/sauce-connect-action@v1
33+
with:
34+
username: ${{ secrets.SAUCE_USERNAME }}
35+
accessKey: ${{ secrets.SAUCE_ACCESS_KEY }}
36+
tunnelIdentifier: github-action-tunnel
37+
scVersion: 4.6.4
38+
- uses: actions/setup-node@v2
39+
- run: yarn install --frozen-lockfile
40+
- run: yarn run test:karma
41+
- uses: codecov/codecov-action@v1
42+
with:
43+
directory: ./coverage/
44+
fail_ci_if_error: true

karma.conf.js

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -216,12 +216,7 @@ module.exports = function (config) {
216216
config.set({
217217
reporters: ['progress', 'saucelabs'],
218218
sauceLabs: {
219-
build:
220-
'Github Workflow' +
221-
process.env.GITHUB_WORKFLOW +
222-
' (' +
223-
process.env.GITHUB_RUN_ID +
224-
')',
219+
build: process.env.GITHUB_SHA,
225220
connectOptions: {
226221
connectRetries: 1,
227222
doctor: true,
@@ -235,7 +230,7 @@ module.exports = function (config) {
235230
recordVideo: false,
236231
startConnect: false,
237232
testName: 'workfront-api',
238-
tunnelIdentifier: process.env.GITHUB_JOB,
233+
tunnelIdentifier: 'github-action-tunnel',
239234
},
240235
captureTimeout: 0,
241236
customLaunchers: customLaunchers,

0 commit comments

Comments
 (0)