From d98f650023ac402a48225d63cda0578c5b94b356 Mon Sep 17 00:00:00 2001 From: a flying potato <80830782+a-flying-potato@users.noreply.github.com> Date: Fri, 26 Mar 2021 15:13:39 +0100 Subject: [PATCH] :robot: config(github): Configure workflow to automate tests of changes. These changes were automatically generated by a transform whose code can be found at: - https://github.com/aureooms/rejuvenate/blob/057c4df07dfcd3ed83201b062803b05a252bf67f/src/transforms/github:workflow-configure-ci:test.js Please contact the author of the transform if you believe there was an error. --- .github/workflows/ci:test.yml | 25 +++++++++++++++++++++++++ .travis.yml | 22 ---------------------- README.md | 2 +- package.json | 4 ++-- 4 files changed, 28 insertions(+), 25 deletions(-) create mode 100644 .github/workflows/ci:test.yml delete mode 100644 .travis.yml 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 5774654..ea376e7 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ pairs.add('bc'); [![License](https://img.shields.io/github/license/aureooms/js-pairs.svg)](https://raw.githubusercontent.com/aureooms/js-pairs/main/LICENSE) [![Version](https://img.shields.io/npm/v/@aureooms/js-pairs.svg)](https://www.npmjs.org/package/@aureooms/js-pairs) -[![Build](https://img.shields.io/travis/aureooms/js-pairs/main.svg)](https://travis-ci.com/aureooms/js-pairs/branches) +[![Tests](https://img.shields.io/github/workflow/status/aureooms/js-pairs/ci:test?event=push&label=tests)](https://github.com/aureooms/js-pairs/actions/workflows/ci:test.yml?query=branch:main) [![Dependencies](https://img.shields.io/david/aureooms/js-pairs.svg)](https://david-dm.org/aureooms/js-pairs) [![Dev dependencies](https://img.shields.io/david/dev/aureooms/js-pairs.svg)](https://david-dm.org/aureooms/js-pairs?type=dev) [![GitHub issues](https://img.shields.io/github/issues/aureooms/js-pairs.svg)](https://github.com/aureooms/js-pairs/issues) diff --git a/package.json b/package.json index bab1db8..abaf20b 100644 --- a/package.json +++ b/package.json @@ -37,6 +37,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": "c8 --all --src src --reporter=lcov npm test", "debug": "NODE_ENV=debug npm run test -- -st --fail-fast", @@ -52,8 +53,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": { "@aureooms/js-error": "^5.0.2",