Skip to content

Commit 46ece32

Browse files
committed
Consolidate CI workflows on GH Actions
Defined the existing workflows in GH Actions and remove them from CircleCI.
1 parent cf28b7e commit 46ece32

File tree

2 files changed

+39
-39
lines changed

2 files changed

+39
-39
lines changed

.circleci/config.yml

Lines changed: 0 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -38,47 +38,8 @@ jobs:
3838
- node_modules
3939
- *persist-step
4040

41-
integration-tests:
42-
docker:
43-
- image: circleci/node:10.15.1-browsers
44-
environment:
45-
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: true
46-
steps:
47-
- *attach-step
48-
- run:
49-
name: Integration tests
50-
command: |
51-
# test-coverage runs test-headless in Chrome
52-
npm run test-coverage -- --chrome "$SINON_CHROME_BIN" --allow-chrome-as-root
53-
54-
if [ -z "$CIRCLE_PULL_REQUESTS" ]; then
55-
npm run test-cloud
56-
fi
57-
- run:
58-
name: Upload coverage report
59-
command: bash <(curl -s https://codecov.io/bash) -F unit -s coverage/lcov.info
60-
61-
saucelabs:
62-
docker:
63-
- image: circleci/node:12
64-
steps:
65-
- *attach-step
66-
- run:
67-
name: Test in browsers (Sauce Labs)
68-
command: npm run test-cloud
69-
7041
workflows:
7142
version: 2
7243
sinon-workflow:
7344
jobs:
7445
- install-dependencies
75-
- integration-tests:
76-
requires:
77-
- install-dependencies
78-
- saucelabs:
79-
context: SAUCE_LABS
80-
requires:
81-
- integration-tests
82-
filters:
83-
branches:
84-
only: master

.github/workflows/main.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,9 +87,48 @@ jobs:
8787
- name: Integration
8888
run: |
8989
export SINON_CHROME_BIN=$(which google-chrome-stable)
90+
91+
# test-coverage runs test-headless in Chrome
92+
npm run test-coverage -- --chrome "$SINON_CHROME_BIN" --allow-chrome-as-root
93+
9094
npm run test-headless -- --chrome $SINON_CHROME_BIN --allow-chrome-as-root
9195
npm run test-webworker -- --chrome $SINON_CHROME_BIN --allow-chrome-as-root
9296
npm run test-esm-bundle
97+
- name: Upload coverage report
98+
run: bash <(curl -s https://codecov.io/bash) -F unit -s coverage/lcov.info
99+
100+
saucelabs-test:
101+
if: ${{ github.ref == 'refs/heads/master' }}
102+
runs-on: ubuntu-latest
103+
104+
strategy:
105+
matrix:
106+
node-version: [16]
107+
108+
steps:
109+
- uses: actions/checkout@v1
110+
- name: Use Node.js ${{ matrix.node-version }}
111+
uses: actions/setup-node@v1
112+
with:
113+
node-version: ${{ matrix.node-version }}
114+
- name: Cache npm
115+
uses: actions/cache@v2
116+
with:
117+
path: ~/.npm
118+
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
119+
restore-keys: |
120+
${{ runner.os }}-node-
121+
- name: Install dependencies
122+
run: |
123+
npm ci
124+
env:
125+
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: 1
126+
- name: Saucelabs test
127+
env:
128+
SAUCE_ACCESS_KEY: ${{ secrets.SAUCE_ACCESS_KEY }}
129+
SAUCE_USERNAME: ${{ secrets.SAUCE_USERNAME }}
130+
run: |
131+
npm run test-cloud
93132
94133
test:
95134
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)