From 90becc7169042b9ea79f4120f5b998ff28138017 Mon Sep 17 00:00:00 2001 From: XhmikosR Date: Mon, 26 Jul 2021 16:44:11 +0300 Subject: Switch to GitHub Action CI --- .circleci/config.yml | 68 ---------------------------------------------- .github/workflows/test.yml | 37 +++++++++++++++++++++++++ README.md | 4 +-- 3 files changed, 39 insertions(+), 70 deletions(-) delete mode 100644 .circleci/config.yml create mode 100644 .github/workflows/test.yml diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index c5f7926..0000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,68 +0,0 @@ -version: 2.1 - -aliases: - - &npm_cache_filename | - {{ .Environment.CIRCLE_JOB }}-{{ .Branch }}-{{ checksum ".circleci/config.yml" }}-{{ checksum "package-lock.json" }} - -commands: - install: - parameters: - install-commands: - description: "Steps that will be executed before the tests" - type: steps - default: [] - steps: - - checkout - - restore_cache: - key: *npm_cache_filename - name: Restoring npm modules - - run: node --version - - run: npm --version - -jobs: - node-6: - docker: - - image: circleci/node:6-stretch - steps: - - install - - run: npm install - - save_cache: - key: *npm_cache_filename - name: Save npm modules - paths: - - ./node_modules/ - - run: npm test - - node-8: - docker: - - image: circleci/node:8-stretch - steps: - - install - - run: npm ci - - save_cache: - key: *npm_cache_filename - name: Save npm modules - paths: - - /home/circleci/.npm - - run: npm test - - node-10: - docker: - - image: circleci/node:10-stretch - steps: - - install - - run: npm ci - - save_cache: - key: *npm_cache_filename - name: Save npm modules - paths: - - /home/circleci/.npm - - run: npm test - -workflows: - version: 2 - test: - jobs: - - node-6 - - node-8 - - node-10 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..fa84fb8 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,37 @@ +name: Tests + +on: [push, pull_request] + +env: + FORCE_COLOR: 2 + +jobs: + run: + name: Node ${{ matrix.node }} + runs-on: ubuntu-latest + + strategy: + fail-fast: false + matrix: + node: [6, 8, 10, 12, 14] + + steps: + - name: Clone repository + uses: actions/checkout@v2 + + - name: Set up Node.js + uses: actions/setup-node@v2 + with: + node-version: ${{ matrix.node }} + cache: npm + + - name: Install npm dependencies + run: npm install + if: matrix.node == 6 + + - name: Install npm dependencies + run: npm ci + if: matrix.node != 6 + + - name: Run tests + run: npm test diff --git a/README.md b/README.md index ead1424..c2c974c 100644 --- a/README.md +++ b/README.md @@ -377,5 +377,5 @@ Code released under [the MIT license](https://github.com/twbs/rfs/blob/v8.x/LICE [npm-url]: https://npmjs.org/package/rfs [licence-image]: https://img.shields.io/npm/l/rfs.svg [license-url]: https://github.com/twbs/rfs/blob/v8.x/LICENSE -[build-image]: https://img.shields.io/circleci/project/github/twbs/rfs/master.svg -[build-url]: https://circleci.com/gh/twbs/rfs +[build-image]: https://github.com/twbs/rfs/workflows/Tests/badge.svg +[build-url]: https://github.com/twbs/rfs/actions?workflow=Tests -- cgit v1.2.3