From eb248416ae7b026ee291c5f2d1f1fbf10266c4af Mon Sep 17 00:00:00 2001 From: Thomas Date: Thu, 6 Jan 2022 09:22:26 +0100 Subject: [PATCH] Switch to github ci & drop node 10 support (#67) * Switch to github ci & drop node 10 support * drop travis * fix --- .github/dependabot.yml | 5 +++- .github/workflows/tester.yml | 46 ++++++++++++++++++++++++++++++++++++ .travis.yml | 21 ---------------- README.md | 4 ++-- package.json | 8 +++---- 5 files changed, 56 insertions(+), 28 deletions(-) create mode 100644 .github/workflows/tester.yml delete mode 100644 .travis.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 93385d9..f3afc1b 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -4,4 +4,7 @@ updates: directory: "/" schedule: interval: daily - open-pull-requests-limit: 20 +- package-ecosystem: github-actions + directory: "/" + schedule: + interval: daily \ No newline at end of file diff --git a/.github/workflows/tester.yml b/.github/workflows/tester.yml new file mode 100644 index 0000000..ea6d383 --- /dev/null +++ b/.github/workflows/tester.yml @@ -0,0 +1,46 @@ +name: Tester + +on: [push, pull_request] + +jobs: + tester: + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-latest, windows-latest, macos-latest] + node-version: ['12.x', '14.x', '16.x'] + fail-fast: false + steps: + - uses: actions/checkout@v2 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v2 + with: + node-version: ${{ matrix.node-version }} + - name: Install Dependencies + run: npm install + - name: Test + run: npm test -- --no-parallel + env: + CI: true + coverage: + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-latest] + node-version: ['14.x'] + steps: + - uses: actions/checkout@v2 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v2 + with: + node-version: ${{ matrix.node-version }} + - name: Install Dependencies + run: npm install + - name: Coverage + run: npm run test-cov + env: + CI: true + - name: Coveralls + uses: coverallsapp/github-action@master + with: + github-token: ${{ secrets.github_token }} \ No newline at end of file diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index e6d47c8..0000000 --- a/.travis.yml +++ /dev/null @@ -1,21 +0,0 @@ -language: node_js - -sudo: false - -cache: - apt: true - directories: - - node_modules - -node_js: - - "10" - - "12" - - "node" - -script: - - npm run eslint - - npm run test-cov - -after_script: - - npm install coveralls - - nyc report --reporter=text-lcov | coveralls diff --git a/README.md b/README.md index 45ed984..2238e1a 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # hexo-generator-tag -[![Build Status](https://travis-ci.org/hexojs/hexo-generator-tag.svg?branch=master)](https://travis-ci.org/hexojs/hexo-generator-tag) +[![Build Status](https://github.com/hexojs/hexo-generator-tag/workflows/Tester/badge.svg)](https://github.com/hexojs/hexo-generator-tag/actions?query=workflow%3ATester) [![NPM version](https://badge.fury.io/js/hexo-generator-tag.svg)](https://www.npmjs.com/package/hexo-generator-tag) [![Coverage Status](https://img.shields.io/coveralls/hexojs/hexo-generator-tag.svg)](https://coveralls.io/r/hexojs/hexo-generator-tag?branch=master) @@ -29,4 +29,4 @@ tag_generator: MIT -[Hexo]: http://hexo.io/ +[Hexo]: https://hexo.io/ diff --git a/package.json b/package.json index b3cc5a6..da117b9 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ "scripts": { "eslint": "eslint .", "test": "mocha test/index.js", - "test-cov": "nyc npm run test" + "test-cov": "nyc --reporter=lcovonly npm run test" }, "directories": { "lib": "./lib" @@ -16,13 +16,13 @@ "lib/" ], "repository": "hexojs/hexo-generator-tag", - "homepage": "http://hexo.io/", + "homepage": "https://hexo.io/", "keywords": [ "hexo", "generator", "tag" ], - "author": "Tommy Chen (http://zespia.tw)", + "author": "Tommy Chen (https://zespia.tw)", "license": "MIT", "devDependencies": { "chai": "^4.2.0", @@ -36,6 +36,6 @@ "hexo-pagination": "2.0.0" }, "engines": { - "node": ">=8.6.0" + "node": ">=12.13.0" } }