diff --git a/.github/workflows/tester.yml b/.github/workflows/tester.yml new file mode 100644 index 0000000..68dff30 --- /dev/null +++ b/.github/workflows/tester.yml @@ -0,0 +1,26 @@ +name: Tester + +on: [push, pull_request] + +permissions: + contents: read + +jobs: + tester: + runs-on: ubuntu-latest + strategy: + matrix: + node-version: ['14.x', '16.x', '18.x'] + fail-fast: false + steps: + - uses: actions/checkout@v3 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node-version }} + - name: Install Dependencies + run: npm install + - name: Test + run: | + npm run eslint + npm run test-cov diff --git a/.gitignore b/.gitignore index 0cbd2b4..2ecda23 100644 --- a/.gitignore +++ b/.gitignore @@ -3,4 +3,5 @@ node_modules/ tmp/ *.log .idea/ -.nyc_output/ \ No newline at end of file +coverage +package-lock.json \ 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 87d1b91..baa9f52 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # hexo-deployer-rsync -[![Build Status](https://travis-ci.org/hexojs/hexo-deployer-rsync.svg?branch=master)](https://travis-ci.org/hexojs/hexo-deployer-rsync) +[![Build Status](https://github.com/hexojs/hexo-deployer-rsync/workflows/Tester/badge.svg)](https://github.com/hexojs/hexo-deployer-rsync/actions?query=workflow%3ATester) [![NPM version](https://badge.fury.io/js/hexo-deployer-rsync.svg)](https://www.npmjs.com/package/hexo-deployer-rsync) Rsync deployer plugin for [Hexo]. diff --git a/package.json b/package.json index 02142b7..3da2ed5 100644 --- a/package.json +++ b/package.json @@ -6,10 +6,7 @@ "scripts": { "eslint": "eslint .", "test": "mocha test/index.js", - "test-cov": "nyc npm run test" - }, - "directories": { - "lib": "./lib" + "test-cov": "c8 npm run test" }, "files": [ "lib/", @@ -26,16 +23,15 @@ "author": "Tommy Chen (http://zespia.tw)", "license": "MIT", "devDependencies": { + "c8": "^7.12.0", "chai": "^4.2.0", - "chai-as-promised": "^7.1.1", "eslint": "^8.1.0", "eslint-config-hexo": "^5.0.0", - "mocha": "^9.1.3", - "nyc": "^15.0.0" + "mocha": "^9.1.3" }, "dependencies": { - "picocolors": "^1.0.0", - "hexo-util": "^2.1.0" + "hexo-util": "^2.1.0", + "picocolors": "^1.0.0" }, "engines": { "node": ">= 8.6.0"