From b026f0b056f2b1608fb6a7a43d8754d67ff76696 Mon Sep 17 00:00:00 2001 From: Simen Bekkhus Date: Wed, 29 Sep 2021 11:33:03 +0200 Subject: [PATCH 1/5] chore: migrate to GH Actions --- .github/workflows/nodejs.yml | 53 ++++++++++++++++++++++++++++++++++++ .travis.yml | 12 -------- README.md | 2 +- package.json | 4 +-- 4 files changed, 55 insertions(+), 16 deletions(-) create mode 100644 .github/workflows/nodejs.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml new file mode 100644 index 0000000..4ba1375 --- /dev/null +++ b/.github/workflows/nodejs.yml @@ -0,0 +1,53 @@ +name: Unit tests + +on: + push: + branches: + - main + - next + pull_request: + branches: + - main + - next + +jobs: + test-node: + name: Test on Node.js v${{ matrix.node-version }} and Jest v${{ matrix.eslint-version }} + strategy: + fail-fast: false + matrix: + node-version: [10.x, 12.x, 13.x, 14.x, 16.x] + jest-version: [24, 25, 26, 27] + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v2 + with: + node-version: ${{ matrix.node-version }} + cache: yarn + - name: install with jest v${{ matrix.jest-version }} + run: | + yarn + yarn add --dev jest@${{ matrix.jest-version }} babel-jest@${{ matrix.jest-version }} + - name: run tests + run: yarn test + test-os: + name: Test on ${{ matrix.os }} using Node.js LTS + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest, windows-latest, macOS-latest] + runs-on: ${{ matrix.os }} + + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v2 + with: + node-version: 14.x + cache: yarn + - name: install + run: yarn + - name: run tests + run: yarn test diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 396d563..0000000 --- a/.travis.yml +++ /dev/null @@ -1,12 +0,0 @@ -language: node_js -node_js: - - "10" - - "12" - - "13" - - "14" -env: - - JEST_VERSION=^24.0.0 - - JEST_VERSION=^25.0.0 - - JEST_VERSION=^26.0.0 -script: - - npm run test:ci diff --git a/README.md b/README.md index 431682e..b89eb23 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -[![Build Status](https://travis-ci.org/jest-community/jest-junit.svg?branch=master)](https://travis-ci.org/jest-community/jest-junit) +[![Actions Status](https://github.com/jest-community/jest-junit/actions/workflows/nodejs.yml/badge.svg?branch=master)](https://github.com/jest-community/jest-junit/actions) # jest-junit A Jest reporter that creates compatible junit xml files diff --git a/package.json b/package.json index b512c30..7a72fcd 100644 --- a/package.json +++ b/package.json @@ -15,9 +15,7 @@ "constants" ], "scripts": { - "test": "jest", - "pretest:ci": "npm uninstall jest babel-jest && npm install jest@$JEST_VERSION babel-jest@$JEST_VERSION --no-save", - "test:ci": "jest --ci" + "test": "jest" }, "dependencies": { "mkdirp": "^1.0.4", From d96d488e79ee03098030a096fef510ee44c057b8 Mon Sep 17 00:00:00 2001 From: Simen Bekkhus Date: Wed, 29 Sep 2021 11:38:18 +0200 Subject: [PATCH 2/5] not main --- .github/workflows/nodejs.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml index 4ba1375..34076f5 100644 --- a/.github/workflows/nodejs.yml +++ b/.github/workflows/nodejs.yml @@ -3,11 +3,11 @@ name: Unit tests on: push: branches: - - main + - master - next pull_request: branches: - - main + - master - next jobs: From bc2b136d7845d9d32ebd842b98bb8d908788e23b Mon Sep 17 00:00:00 2001 From: Simen Bekkhus Date: Wed, 29 Sep 2021 11:38:53 +0200 Subject: [PATCH 3/5] typo --- .github/workflows/nodejs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml index 34076f5..33b67dc 100644 --- a/.github/workflows/nodejs.yml +++ b/.github/workflows/nodejs.yml @@ -12,7 +12,7 @@ on: jobs: test-node: - name: Test on Node.js v${{ matrix.node-version }} and Jest v${{ matrix.eslint-version }} + name: Test on Node.js v${{ matrix.node-version }} and Jest v${{ matrix.jest-version }} strategy: fail-fast: false matrix: From 6ac9000cf62d1c5a93469ffcaa5fd8b8e811c03a Mon Sep 17 00:00:00 2001 From: Simen Bekkhus Date: Wed, 29 Sep 2021 11:42:09 +0200 Subject: [PATCH 4/5] not 27 --- .github/workflows/nodejs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml index 33b67dc..9b76ee6 100644 --- a/.github/workflows/nodejs.yml +++ b/.github/workflows/nodejs.yml @@ -17,7 +17,7 @@ jobs: fail-fast: false matrix: node-version: [10.x, 12.x, 13.x, 14.x, 16.x] - jest-version: [24, 25, 26, 27] + jest-version: [24, 25, 26] runs-on: ubuntu-latest steps: From 47ddcadf432ff5cf67e8f1bdafabe2abbd081e3d Mon Sep 17 00:00:00 2001 From: Simen Bekkhus Date: Wed, 29 Sep 2021 11:44:22 +0200 Subject: [PATCH 5/5] not windows --- .github/workflows/nodejs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml index 9b76ee6..7f0fdc0 100644 --- a/.github/workflows/nodejs.yml +++ b/.github/workflows/nodejs.yml @@ -38,7 +38,7 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu-latest, windows-latest, macOS-latest] + os: [ubuntu-latest, macOS-latest] runs-on: ${{ matrix.os }} steps: