Skip to content
This repository has been archived by the owner on Nov 10, 2022. It is now read-only.

chore: add test workflow #3

Merged
merged 3 commits into from
Feb 18, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 54 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Unit Tests
on:
push:
branches:
- main
pull_request:

jobs:
unit-test:
strategy:
fail-fast: false
matrix:
container: ["node:8", "node:10", "node:12", "node:14"]
runs-on: ubuntu-latest
container:
image: ${{ matrix.container }}
steps:
- name: Checkout
uses: actions/checkout@v1

- name: Install Dependencies
run: npm ci

- name: Compile 🔧
run: npm run compile

- 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
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Permission Setup
run: sudo chmod -R 777 /github /__w

- name: Install Dependencies
run: npm ci

- name: Compile 🔧
run: npm run compile

- name: Unit tests
run: npm run test:browser

- name: Report Coverage
run: npm run codecov:browser
Loading