diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 00000000..26ec260e --- /dev/null +++ b/.github/workflows/test.yml @@ -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 diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 11ebf4f1..00000000 --- a/.travis.yml +++ /dev/null @@ -1,12 +0,0 @@ -os: - - linux - - windows - - osx - -language: node_js -node_js: - - "6" - - "8" - - "10" - - "12.9" # 12.10 introduced a breaking change on fs stat internal storage. - - "12" diff --git a/readme.md b/readme.md index c5fb2baa..61dca207 100644 --- a/readme.md +++ b/readme.md @@ -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)