diff --git a/.github/workflows/ci:test.yml b/.github/workflows/ci:test.yml new file mode 100644 index 0000000..03f7739 --- /dev/null +++ b/.github/workflows/ci:test.yml @@ -0,0 +1,25 @@ +name: ci:test +on: + - push + - pull_request +jobs: + test: + name: Continuous integration (tests) + runs-on: ubuntu-latest + steps: + - name: Checkout 🛎️ + uses: actions/checkout@v3 + + - name: Install 🔧 + uses: bahmutov/npm-install@v1 + with: + install-command: yarn --frozen-lockfile --ignore-scripts + useRollingCache: true + + - name: Test 🔬 + run: yarn ci:test + + - name: Publish coverage report 📃 + uses: codecov/codecov-action@v2 + with: + fail_ci_if_error: true diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index bc3f97c..0000000 --- a/.travis.yml +++ /dev/null @@ -1,22 +0,0 @@ -language: node_js - -node_js: - - node - -install: - - npm install - -before_script: - - curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter - - chmod +x ./cc-test-reporter - - ./cc-test-reporter before-build - -script: - - npm run travis - -after_script: - - ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT - -after_success: - - bash <(curl -s https://codecov.io/bash) || true - - coveralls < coverage/lcov.info || true diff --git a/README.md b/README.md index 6bdb357..b1be547 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ U.find( a ) === U.find( b ) ; // true [![License](https://img.shields.io/github/license/union-find/contiguous.svg)](https://raw.githubusercontent.com/union-find/contiguous/main/LICENSE) [![Version](https://img.shields.io/npm/v/@union-find/contiguous.svg)](https://www.npmjs.org/package/@union-find/contiguous) -[![Build](https://img.shields.io/travis/union-find/contiguous/main.svg)](https://travis-ci.com/union-find/contiguous/branches) +[![Tests](https://img.shields.io/github/workflow/status/union-find/contiguous/ci:test?event=push&label=tests)](https://github.com/union-find/contiguous/actions/workflows/ci:test.yml?query=branch:main) [![Dependencies](https://img.shields.io/librariesio/github/union-find/contiguous.svg)](https://github.com/union-find/contiguous/network/dependencies) [![GitHub issues](https://img.shields.io/github/issues/union-find/contiguous.svg)](https://github.com/union-find/contiguous/issues) [![Downloads](https://img.shields.io/npm/dm/@union-find/contiguous.svg)](https://www.npmjs.org/package/@union-find/contiguous) diff --git a/package.json b/package.json index 037c08b..4ef8085 100644 --- a/package.json +++ b/package.json @@ -50,6 +50,7 @@ "build": "NODE_ENV=production microbundle", "build-docs": "esdoc", "build-gh-pages": "npm run build-docs", + "ci:test": "npm run lint-config && npm run lint && npm run cover", "commit-msg": "commitlint --edit", "cover": "NODE_ENV=cover c8 --all --src src --reporter lcov --reporter text-summary --reporter text npm test", "debug": "NODE_ENV=debug npm run test -- -st --fail-fast", @@ -65,8 +66,7 @@ "prepare": "npm run build", "prepublishOnly": "pinst --disable", "release": "np --message ':hatching_chick: release: Bumping to v%s.'", - "test": "ava", - "travis": "npm run lint-config && npm run lint && npm run cover" + "test": "ava" }, "dependencies": {}, "devDependencies": {