diff --git a/.github/workflows/dev.yml b/.github/workflows/dev.yml new file mode 100644 index 0000000..49fe458 --- /dev/null +++ b/.github/workflows/dev.yml @@ -0,0 +1,78 @@ +name: dev +on: + pull_request: + push: + branches: + +env: + CI: true + +jobs: + prettier: + name: Format code + runs-on: ubuntu-latest + if: | + github.event_name == 'push' && + github.ref == 'refs/heads/master' && + github.repository_owner == 'gulpjs' + + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Prettier + uses: gulpjs/prettier_action@v3.0 + with: + commit_message: 'Build: Run prettier' + prettier_options: '--write .' + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + test: + name: Tests for Node ${{ matrix.node }} on ${{ matrix.os }} + runs-on: ${{ matrix.os }} + + 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 + + - name: Run lint and test + run: npm test + + - name: Coveralls Parallel + uses: coverallsapp/github-action@v1.1.0 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + parallel: true + env: + COVERALLS_FLAG_NAME: ${{matrix.os}}-node-${{ matrix.node }} + + strategy: + fail-fast: false + matrix: + node: [10, 12, 14] + os: [ubuntu-latest, windows-latest, macos-latest] + + coveralls: + name: Finish up + runs-on: ubuntu-latest + needs: test + + steps: + - name: Coveralls Finished + uses: coverallsapp/github-action@v1.1.0 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + parallel-finished: true + diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 7e14b19..0000000 --- a/.travis.yml +++ /dev/null @@ -1,11 +0,0 @@ -sudo: false -language: node_js -node_js: - - '10' - - '8' - - '6' - - '4' - - '0.12' - - '0.10' -after_script: - - npm run coveralls diff --git a/README.md b/README.md index 6d5f2fe..3d02b76 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ # rechoir -[![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Travis Build Status][travis-image]][travis-url] [![AppVeyor Build Status][appveyor-image]][appveyor-url] [![Coveralls Status][coveralls-image]][coveralls-url] +[![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Build Status][ci-image]][ci-url] [![Coveralls Status][coveralls-image]][coveralls-url] Prepare a node environment to require files with different extensions. @@ -67,10 +67,8 @@ MIT [downloads-image]: https://img.shields.io/npm/dm/rechoir.svg?style=flat-square [npm-url]: https://www.npmjs.com/package/rechoir [npm-image]: https://img.shields.io/npm/v/rechoir.svg?style=flat-square -[travis-url]: https://travis-ci.org/gulpjs/rechoir -[travis-image]: https://img.shields.io/travis/gulpjs/rechoir.svg?label=travis-ci -[appveyor-url]: https://ci.appveyor.com/project/gulpjs/rechoir -[appveyor-image]: https://img.shields.io/appveyor/ci/gulpjs/rechoir.svg?label=appveyor +[ci-url]: https://github.com/gulpjs/rechoir/actions?query=workflow:dev +[ci-image]: https://img.shields.io/github/workflow/status/gulpjs/rechoir/dev?style=flat-square [coveralls-url]: https://coveralls.io/r/gulpjs/rechoir [coveralls-image]: https://img.shields.io/coveralls/gulpjs/rechoir/master.svg [tidelift-url]: https://tidelift.com/subscription/pkg/npm-rechoir?utm_source=npm-rechoir&utm_medium=referral&utm_campaign=enterprise&utm_term=repo diff --git a/appveyor.yml b/appveyor.yml deleted file mode 100644 index cdcc345..0000000 --- a/appveyor.yml +++ /dev/null @@ -1,26 +0,0 @@ -# http://www.appveyor.com/docs/appveyor-yml -# http://www.appveyor.com/docs/lang/nodejs-iojs - -environment: - matrix: - # node.js - - nodejs_version: '0.10' - - nodejs_version: '0.12' - - nodejs_version: '4' - - nodejs_version: '6' - - nodejs_version: '8' - - nodejs_version: '10' - -install: - - ps: Install-Product node $env:nodejs_version - - npm install - -test_script: - - node --version - - npm --version - - cmd: npm test - -build: off - -# build version format -version: '{build}'