diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000000..4b17a48c73 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,51 @@ +name: CI + +on: + - push + - pull_request + +jobs: + test: + name: Node.js ${{ matrix.node_version }} on ${{ matrix.os }} + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + node_version: + - 13 + - 12 + - 10 + os: + - ubuntu-latest + - windows-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node_version }} + - run: npm install + - run: npm run test + - uses: coverallsapp/github-action@master + if: matrix.os == 'ubuntu-latest' && matrix.node_version == 12 + with: + github-token: ${{ secrets.github_token }} + + lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v1 + with: + node-version: 12 + - run: npm install + - run: npm run lint + + integration: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v1 + with: + node-version: 12 + - run: npm install + - run: npm run integration diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 895f1970dd..0000000000 --- a/.travis.yml +++ /dev/null @@ -1,18 +0,0 @@ -language: node_js -node_js: - - '12' - - '10' -cache: - npm: false -matrix: - include: - - node_js: '12' - env: INTEGRATION=true SKIP_TEST=true - - node_js: '12' - env: LINT=true SKIP_TEST=true -script: - - if [[ $INTEGRATION == true ]]; then npm run integration; fi - - if [[ $LINT == true ]]; then npm run lint; fi - - if [[ $SKIP_TEST != true ]]; then npm test; fi -after_success: - - if [[ $SKIP_TEST != true ]]; then ./node_modules/.bin/nyc report --reporter=text-lcov | ./node_modules/.bin/coveralls; fi diff --git a/package.json b/package.json index 80860d91f3..73f4427ee5 100644 --- a/package.json +++ b/package.json @@ -78,6 +78,11 @@ "test/*.js" ] }, + "nyc": { + "reporter": [ + "lcov" + ] + }, "xo": { "plugins": [ "eslint-plugin" @@ -92,6 +97,9 @@ "eslint-plugin/require-meta-docs-url": "off" } } - ] + ], + "rules": { + "import/order": "off" + } } } diff --git a/readme.md b/readme.md index d76c5830dc..09fdc932e6 100644 --- a/readme.md +++ b/readme.md @@ -1,4 +1,4 @@ -# eslint-plugin-unicorn [![Build Status](https://travis-ci.org/sindresorhus/eslint-plugin-unicorn.svg?branch=master)](https://travis-ci.org/sindresorhus/eslint-plugin-unicorn) [![Coverage Status](https://coveralls.io/repos/github/sindresorhus/eslint-plugin-unicorn/badge.svg?branch=master)](https://coveralls.io/github/sindresorhus/eslint-plugin-unicorn?branch=master) +# eslint-plugin-unicorn [![Build Status](https://github.com/sindresorhus/eslint-plugin-unicorn/workflows/CI/badge.svg)](https://github.com/sindresorhus/eslint-plugin-unicorn/actions) [![Coverage Status](https://coveralls.io/repos/github/sindresorhus/eslint-plugin-unicorn/badge.svg?branch=master)](https://coveralls.io/github/sindresorhus/eslint-plugin-unicorn?branch=master)