diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..9c07b0e --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,48 @@ +name: Tests +'on': + push: + pull_request: + +jobs: + test: + runs-on: ubuntu-18.04 + name: Node ${{ matrix.node }} + strategy: + matrix: + node: + - '12' + - '14' + - '16' + steps: + - uses: actions/checkout@v2 + - name: Setup node + uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node }} + - run: npm install + - run: npm test + + test-targets: + runs-on: ubuntu-18.04 + name: ${{ matrix.targets.name }} + strategy: + matrix: + targets: + - name: 'Lint' + target: 'lint' + - name: 'Coverage' + target: 'coverage' + + steps: + - uses: actions/checkout@v2 + - name: Setup node + uses: actions/setup-node@v1 + with: + node-version: '14' + - run: npm install + - run: npm run ${{ matrix.targets.target }} + - name: Upload coverage + uses: coverallsapp/github-action@master + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + if: ${{ matrix.targets.target == 'coverage' }} diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 0032589..0000000 --- a/.travis.yml +++ /dev/null @@ -1,15 +0,0 @@ -language: node_js -node_js: - - 10 - - 12 - - 14 - - 'node' - -matrix: - include: - - name: Lint - node_js: 14 - script: npm run lint - -script: npm run test:ci -after_success: '