Skip to content

Commit

Permalink
Merge pull request #296 from tschaub/actions
Browse files Browse the repository at this point in the history
Run tests in a GitHub workflow
  • Loading branch information
tschaub authored Apr 20, 2020
2 parents b6f6361 + cfe800f commit cd83f45
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 13 deletions.
48 changes: 48 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Test

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

env:
CI: true

jobs:
run:
name: Node ${{ matrix.node }} / ${{ matrix.os }}
runs-on: ${{ matrix.os }}

strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- macos-latest
- windows-latest
node:
- 6
- 8
- 10
- 12

steps:
- name: Clone repository
uses: actions/checkout@v2

- name: Set Node.js version
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node }}

- run: node --version
- run: npm --version

- name: Install npm dependencies
run: npm install # switch to `ci` when Node.js 6.x is dropped

- name: Run tests
run: npm test
12 changes: 0 additions & 12 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -224,4 +224,4 @@ expect(actual).toMatchSnapshot()
Note: it's safe to call `mock.restore` multiple times, so it can still be called in `afterEach` and then manually
in test cases which use snapshot testing.

[![Current Status](https://secure.travis-ci.org/tschaub/mock-fs.png?branch=master)](https://travis-ci.org/tschaub/mock-fs)
[![Build Status](https://github.com/tschaub/mock-fs/workflows/Test/badge.svg)](https://github.com/tschaub/mock-fs/actions?workflow=Test)

0 comments on commit cd83f45

Please sign in to comment.