diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml new file mode 100644 index 0000000..adde224 --- /dev/null +++ b/.github/workflows/nodejs.yml @@ -0,0 +1,40 @@ +name: Unit tests + +on: + push: + branches: + - main + - next + pull_request: + branches: + - main + - next + +jobs: + test-node: + name: + # prettier-ignore + Test on Node.js v${{ matrix.node-version }}, eslint v${{ matrix.eslint-version }} and jest v${{ matrix.jest-version }} + strategy: + fail-fast: false + matrix: + node-version: [10.x, 12.x, 14.x, 16.x] + eslint-version: [6, 7] + jest-version: [25, 26, 27] + include: + # eslint@7 and jest@26 doesn't support node@8 + - node-version: 8.x + eslint-version: 6 + jest-version: 25 + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v2.1.5 + with: + node-version: ${{ matrix.node-version }} + - name: install with eslint v${{ matrix.eslint-version }} and jest@${{ matrix.jest-version }} + run: yarn add --dev eslint@${{ matrix.eslint-version }} jest@${{ matrix.jest-version }} --ignore-engines + - name: run tests + run: yarn test diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index dee7a5e..0000000 --- a/.travis.yml +++ /dev/null @@ -1,23 +0,0 @@ -language: node_js -node_js: - # eslint 7: node 10.12+ - # jest 26: node 10.14.2+ - - 14 - - 12 - - 10 -install: - - 'yarn add "eslint@${ESLINT}" "jest@${JEST}" "babel-jest@${JEST}" --ignore-engines' - - 'yarn --ignore-engines' -env: - - 'ESLINT=6 JEST=25' - - 'ESLINT=7 JEST=25' - - 'ESLINT=6 JEST=26' - - 'ESLINT=7 JEST=26' - - 'ESLINT=6 JEST=27' - - 'ESLINT=7 JEST=27' -matrix: - # jest 25: node 8+ - include: - # eslint 6, node 8 - - node_js: 8 - env: 'ESLINT=6 JEST=25' diff --git a/README.md b/README.md index 89b18ca..a60dd1e 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -[![Build Status](https://travis-ci.org/jest-community/jest-runner-eslint.svg?branch=main)](https://travis-ci.org/jest-community/jest-runner-eslint) [![npm version](https://badge.fury.io/js/jest-runner-eslint.svg)](https://badge.fury.io/js/jest-runner-eslint) +[![Actions Status](https://github.com/jest-community/jest-runner-eslint/actions/workflows/nodejs.yml/badge.svg?branch=main)](https://github.com/jest-community/jest-runner-eslint/actions) [![npm version](https://badge.fury.io/js/jest-runner-eslint.svg)](https://badge.fury.io/js/jest-runner-eslint)