diff --git a/.github/workflows/ci:test.yml b/.github/workflows/ci:test.yml new file mode 100644 index 0000000..471d9ed --- /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@v2 + + - 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@v1 + 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 94c467e..c5f4b8c 100644 --- a/README.md +++ b/README.md @@ -67,7 +67,7 @@ isPartition(range(5), [[5], [0], [1], [2], [3], [4]]); // false [![License](https://img.shields.io/github/license/computational-combinatorics/set-partition.svg)](https://raw.githubusercontent.com/computational-combinatorics/set-partition/main/LICENSE) [![Version](https://img.shields.io/npm/v/@combinatorics/set-partition.svg)](https://www.npmjs.org/package/@combinatorics/set-partition) -[![Build](https://img.shields.io/travis/computational-combinatorics/set-partition/main.svg)](https://travis-ci.com/computational-combinatorics/set-partition/branches) +[![Tests](https://img.shields.io/github/workflow/status/computational-combinatorics/set-partition/ci:test?event=push&label=tests)](https://github.com/computational-combinatorics/set-partition/actions/workflows/ci:test.yml?query=branch:main) [![Dependencies](https://img.shields.io/david/computational-combinatorics/set-partition.svg)](https://david-dm.org/computational-combinatorics/set-partition) [![Dev dependencies](https://img.shields.io/david/dev/computational-combinatorics/set-partition.svg)](https://david-dm.org/computational-combinatorics/set-partition?type=dev) [![GitHub issues](https://img.shields.io/github/issues/computational-combinatorics/set-partition.svg)](https://github.com/computational-combinatorics/set-partition/issues) diff --git a/package.json b/package.json index 0025e4d..3abd7bd 100644 --- a/package.json +++ b/package.json @@ -39,6 +39,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", @@ -54,8 +55,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": { "@iterable-iterator/list": "^0.0.2",