Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: migrate to GH Actions #185

Merged
merged 5 commits into from Sep 29, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
53 changes: 53 additions & 0 deletions .github/workflows/nodejs.yml
@@ -0,0 +1,53 @@
name: Unit tests

on:
push:
branches:
- master
- next
pull_request:
branches:
- master
- next

jobs:
test-node:
name: Test on Node.js v${{ matrix.node-version }} and Jest v${{ matrix.jest-version }}
strategy:
fail-fast: false
matrix:
node-version: [10.x, 12.x, 13.x, 14.x, 16.x]
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

13 is EOL, but since it was tested on travis let's keep it

(10 is EOL as well, but that's documented in README as minimum version)

jest-version: [24, 25, 26]
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, 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
12 changes: 0 additions & 12 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion 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
Expand Down
4 changes: 1 addition & 3 deletions package.json
Expand Up @@ -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",
Expand Down