From 087879e6fd197f9d1e88dd6fb09a0d0f2d26f026 Mon Sep 17 00:00:00 2001 From: Thomas Date: Sat, 8 Jan 2022 08:38:30 +0100 Subject: [PATCH 1/2] Switch to github actions (drop appveyor & travis) * bump to latest minor dependencies * cleanup readme --- .github/dependabot.yml | 5 +++- .github/workflows/tester.yml | 46 ++++++++++++++++++++++++++++++++++++ .travis.yml | 18 -------------- README.md | 5 +--- appveyor.yml | 36 ---------------------------- package.json | 24 +++++++++---------- 6 files changed, 63 insertions(+), 71 deletions(-) create mode 100644 .github/workflows/tester.yml delete mode 100644 .travis.yml delete mode 100644 appveyor.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 99cfc58..0000000 --- a/.travis.yml +++ /dev/null @@ -1,18 +0,0 @@ -language: node_js - -cache: - npm: true - -node_js: - - "10" - - "12" - - "13" - - "14" - -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 6b15d67..58758f6 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,8 @@ # hexo-fs -[![Build Status](https://travis-ci.org/hexojs/hexo-fs.svg?branch=master)](https://travis-ci.org/hexojs/hexo-fs) +[![Build Status](https://github.com/hexojs/hexo-fs/workflows/Tester/badge.svg)](https://github.com/hexojs/hexo-fs/actions?query=workflow%3ATester) [![NPM version](https://badge.fury.io/js/hexo-fs.svg)](https://www.npmjs.com/package/hexo-fs) [![Coverage Status](https://img.shields.io/coveralls/hexojs/hexo-fs.svg)](https://coveralls.io/r/hexojs/hexo-fs?branch=master) -[![Build status](https://ci.appveyor.com/api/projects/status/github/hexojs/hexo-fs?svg=true)](https://ci.appveyor.com/project/tommy351/hexo-fs/branch/master) -[![dependencies Status](https://david-dm.org/hexojs/hexo-fs/status.svg)](https://david-dm.org/hexojs/hexo-fs) -[![devDependencies Status](https://david-dm.org/hexojs/hexo-fs/dev-status.svg)](https://david-dm.org/hexojs/hexo-fs?type=dev) File system module for [Hexo]. diff --git a/appveyor.yml b/appveyor.yml deleted file mode 100644 index b545249..0000000 --- a/appveyor.yml +++ /dev/null @@ -1,36 +0,0 @@ -# Fix line endings in Windows. (runs before repo cloning) -init: - - git config --global core.autocrlf input - -# Test against these versions of Node.js. -environment: - matrix: - - nodejs_version: "10" - - nodejs_version: "12" - - nodejs_version: "13" - - nodejs_version: "14" - -matrix: - fast_finish: true - -# Install scripts. (runs after repo cloning) -install: - - ps: Install-Product node $env:nodejs_version - - npm install - -cache: - - node_modules -> package.json - -# Post-install test scripts. -test_script: - # Output useful info for debugging. - - node --version - - npm --version - # Run tests - - npm test - -# Don't actually build. -build: off - -# Set build version format here instead of in the admin panel. -version: "{build}" diff --git a/package.json b/package.json index 39d619d..a515008 100644 --- a/package.json +++ b/package.json @@ -22,25 +22,25 @@ "fs", "hexo" ], - "author": "Tommy Chen (http://zespia.tw)", + "author": "Tommy Chen (https://zespia.tw)", "maintainers": [ - "Abner Chou (http://abnerchou.me)" + "Abner Chou (https://abnerchou.me)" ], "license": "MIT", "dependencies": { - "bluebird": "^3.5.1", - "chokidar": "^3.0.0", - "graceful-fs": "^4.1.11", - "hexo-util": "^2.0.0" + "bluebird": "^3.7.2", + "chokidar": "^3.5.2", + "graceful-fs": "^4.2.9", + "hexo-util": "^2.5.0" }, "devDependencies": { - "chai": "^4.1.2", - "eslint": "^8.0.1", - "eslint-config-hexo": "^4.1.0", - "mocha": "^8.0.1", - "nyc": "^15.0.0" + "chai": "^4.3.4", + "eslint": "^8.6.0", + "eslint-config-hexo": "^4.2.0", + "mocha": "^8.4.0", + "nyc": "^15.1.0" }, "engines": { - "node": ">=10.13.0" + "node": ">=12.13.0" } } From b91a58268ab6151c5007aedf01f67c42a819f3b3 Mon Sep 17 00:00:00 2001 From: Thomas Date: Sat, 8 Jan 2022 08:45:38 +0100 Subject: [PATCH 2/2] fix --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index a515008..9a31323 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"