Skip to content

Commit

Permalink
Migrated CircleCI unit-tests to GHA
Browse files Browse the repository at this point in the history
  • Loading branch information
shovnik committed Dec 2, 2020
1 parent 42187f2 commit ac5283c
Show file tree
Hide file tree
Showing 4 changed files with 76 additions and 3 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/backcompat.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
name: Backwards Compatability

on: [push, pull_request]
on:
push:
branches: [master]
pull_request:

jobs:
types-node:
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
name: Lint

on: [push, pull_request]
on:
push:
branches: [master]
pull_request:

jobs:
build:
Expand Down
64 changes: 64 additions & 0 deletions .github/workflows/unit-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: Unit Tests
on:
push:
branches: [master]
pull_request:

jobs:
unit-test:
fail-fast: false
strategy:
matrix:
container: ["node:8", "node:10", "node:12", "node:14"]
runs-on: ubuntu-latest
container:
image: ${{ matrix.container }}
env:
NPM_CONFIG_UNSAFE_PERM: true
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Cache Dependencies
uses: actions/cache@v2
with:
path: |
node_modules
package-lock.json
packages/*/node_modules
key: ${{ runner.os }}-${{ matrix.container }}-${{ hashFiles('**/package.json') }}
- name: Install Root Dependencies
run: npm install --ignore-scripts
- name: Boostrap Dependencies
run: npx lerna bootstrap --no-ci
- name: Unit tests
run: npm run test
- name: Report Coverage
run: npm run codecov
if: ${{ matrix.container }} == 'node:12'
browser-tests:
runs-on: ubuntu-latest
container:
image: circleci/node:12-browsers
env:
NPM_CONFIG_UNSAFE_PERM: true
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Permission Setup
run: sudo chmod -R 777 /github /__w
- name: Cache Dependencies
uses: actions/cache@v2
with:
path: |
node_modules
package-lock.json
packages/*/node_modules
key: ${{ runner.os }}-node:12-${{ hashFiles('**/package.json') }}
- name: Install Root Dependencies
run: npm install --ignore-scripts
- name: Boostrap Dependencies
run: npx lerna bootstrap --no-ci
- name: Unit tests
run: npm run test:browser
- name: Report Coverage
run: npm run codecov:browser
5 changes: 4 additions & 1 deletion .github/workflows/w3c-integration-test.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
name: Run w3c tests on push

on: [push]
on:
push:
branches: [master]
pull_request:

jobs:
build-and-deploy:
Expand Down

0 comments on commit ac5283c

Please sign in to comment.