Skip to content

Commit

Permalink
Merge 25d67d8 into cad2ae5
Browse files Browse the repository at this point in the history
  • Loading branch information
PhakornKiong committed Mar 30, 2021
2 parents cad2ae5 + 25d67d8 commit fa62763
Showing 1 changed file with 60 additions and 0 deletions.
60 changes: 60 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# This is a basic workflow to help you get started with Actions

name: tests

# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
branches: [ master ]
pull_request:
branches: [ master ]

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
Build_Test:
# The type of runner that the job will run on
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [8.12,15.x]

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Checkout Repository
uses: actions/checkout@v2
with:
fetch-depth: 1

# Runs a single command using the runners shell
- name: Setup Node ${{ matrix.node-version }}
uses: actions/setup-node@v2.1.5
with:
always-auth: false
node-version: ${{ matrix.node-version }}


- name: Run npm install
run: npm install

- name: Run Tests
if: ${{ matrix.node-version == 8.12 }}
run: npm run test:clscover
env:
CI: true

- name: Run Tests
if: ${{ matrix.node-version != 8.12 }}
run: npm run cover
env:
CI: true

- name: Update Coveralls
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
flag-name: Unit Test
if: success()

0 comments on commit fa62763

Please sign in to comment.