Skip to content

Commit 1a24f40

Browse files
authored
Migrate CircleCI unit test workflow to Github Actions (#1711)
1 parent 433b15c commit 1a24f40

File tree

6 files changed

+76
-185
lines changed

6 files changed

+76
-185
lines changed

.circleci/checksum.sh

-27
This file was deleted.

.circleci/config.yml

-155
This file was deleted.

.github/workflows/backcompat.yml

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
name: Backwards Compatability
22

3-
on: [push, pull_request]
3+
on:
4+
push:
5+
branches: [master]
6+
pull_request:
47

58
jobs:
69
types-node:

.github/workflows/lint.yml

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
name: Lint
22

3-
on: [push, pull_request]
3+
on:
4+
push:
5+
branches: [master]
6+
pull_request:
47

58
jobs:
69
build:

.github/workflows/unit-test.yml

+64
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
name: Unit Tests
2+
on:
3+
push:
4+
branches: [master]
5+
pull_request:
6+
7+
jobs:
8+
unit-test:
9+
strategy:
10+
fail-fast: false
11+
matrix:
12+
container: ["node:8", "node:10", "node:12", "node:14"]
13+
runs-on: ubuntu-latest
14+
container:
15+
image: ${{ matrix.container }}
16+
env:
17+
NPM_CONFIG_UNSAFE_PERM: true
18+
steps:
19+
- name: Checkout
20+
uses: actions/checkout@v1
21+
- name: Cache Dependencies
22+
uses: actions/cache@v2
23+
with:
24+
path: |
25+
node_modules
26+
package-lock.json
27+
packages/*/node_modules
28+
key: ${{ runner.os }}-${{ matrix.container }}-${{ hashFiles('**/package.json') }}
29+
- name: Install Root Dependencies
30+
run: npm install --ignore-scripts
31+
- name: Boostrap Dependencies
32+
run: npx lerna bootstrap --no-ci
33+
- name: Unit tests
34+
run: npm run test
35+
- name: Report Coverage
36+
run: npm run codecov
37+
if: ${{ matrix.container }} == 'node:12'
38+
browser-tests:
39+
runs-on: ubuntu-latest
40+
container:
41+
image: circleci/node:12-browsers
42+
env:
43+
NPM_CONFIG_UNSAFE_PERM: true
44+
steps:
45+
- name: Checkout
46+
uses: actions/checkout@v1
47+
- name: Permission Setup
48+
run: sudo chmod -R 777 /github /__w
49+
- name: Cache Dependencies
50+
uses: actions/cache@v2
51+
with:
52+
path: |
53+
node_modules
54+
package-lock.json
55+
packages/*/node_modules
56+
key: ${{ runner.os }}-node:12-${{ hashFiles('**/package.json') }}
57+
- name: Install Root Dependencies
58+
run: npm install --ignore-scripts
59+
- name: Boostrap Dependencies
60+
run: npx lerna bootstrap --no-ci
61+
- name: Unit tests
62+
run: npm run test:browser
63+
- name: Report Coverage
64+
run: npm run codecov:browser

.github/workflows/w3c-integration-test.yml

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
name: Run w3c tests on push
22

3-
on: [push]
3+
on:
4+
push:
5+
branches: [master]
6+
pull_request:
47

58
jobs:
69
build-and-deploy:

0 commit comments

Comments
 (0)