Skip to content

Commit

Permalink
Replace travis with GitHub action (#123)
Browse files Browse the repository at this point in the history
* Update dependencies

* Add github action for testing

* Delete travis file

* Move coverage call into npm scripts

* Remove coverage call for now

* Add github action for coverage

needs secret in seetings though

* Try other coverage action style

* Fix uppercase and cleanup
  • Loading branch information
Veeck authored Sep 28, 2021
1 parent 85afb4b commit 99614f5
Show file tree
Hide file tree
Showing 4 changed files with 674 additions and 1,001 deletions.
53 changes: 53 additions & 0 deletions .github/workflows/test_and_coverage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions

name: "Run Automated Tests"

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

jobs:
test:
runs-on: ubuntu-latest
timeout-minutes: 30
strategy:
matrix:
node-version: [12.x, 14.x, 16.x]
steps:
- name: Checkout code 🛎️
uses: actions/checkout@v2
- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Install dependencies and run tests
run: |
npm ci
npm test
npm run coverage
# Run the coveralls action which uploads the
# lcov.info file
- name: Coveralls Parallel
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.github_token }}
flag-name: run-${{ matrix.node }}
# This is a parallel build so need this
parallel: true

# As testing against multiple versions need this to
# finish the parallel build
finish:
name: Coveralls coverage
needs: test
runs-on: ubuntu-latest
steps:
- name: Coveralls Finished
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
parallel-finished: true
10 changes: 0 additions & 10 deletions .travis.yml

This file was deleted.

Loading

0 comments on commit 99614f5

Please sign in to comment.