From ff3eae29160a5526cf208661a523547e8c05326e Mon Sep 17 00:00:00 2001 From: Thomas Date: Sat, 8 Jan 2022 08:50:54 +0100 Subject: [PATCH 1/2] Switch to github actions (drop travis & appveyor) * drop node 8 & 10 support * bump eslint* packages to latest minor * bump all other to latest minor --- .github/dependabot.yml | 4 ++++ .github/workflows/tester.yml | 46 ++++++++++++++++++++++++++++++++++++ .travis.yml | 25 -------------------- README.md | 5 ++-- appveyor.yml | 38 ----------------------------- package.json | 30 +++++++++++------------ 6 files changed, 67 insertions(+), 81 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 d0a9746..f3afc1b 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -4,3 +4,7 @@ updates: directory: "/" schedule: interval: daily +- 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 91258a3..0000000 --- a/.travis.yml +++ /dev/null @@ -1,25 +0,0 @@ -language: node_js - -sudo: false - -cache: - apt: true - directories: - - node_modules - -node_js: - - "8" - - "10" - - "12" - -before_script: - - git config --global user.email "you@example.com" - - git config --global user.name "Your Name" - -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 31d4aec..983fe24 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,8 @@ # hexo-deployer-heroku -[![Build Status](https://travis-ci.org/hexojs/hexo-deployer-heroku.svg?branch=master)](https://travis-ci.org/hexojs/hexo-deployer-heroku) +[![Build Status](https://github.com/hexojs/hexo-deployer-heroku/workflows/Tester/badge.svg)](https://github.com/hexojs/hexo-deployer-heroku/actions?query=workflow%3ATester) [![NPM version](https://badge.fury.io/js/hexo-deployer-heroku.svg)](https://www.npmjs.com/package/hexo-deployer-heroku) [![Coverage Status](https://coveralls.io/repos/hexojs/hexo-deployer-heroku/badge.svg)](https://coveralls.io/r/hexojs/hexo-deployer-heroku) -[![Build status](https://ci.appveyor.com/api/projects/status/github/hexojs/hexo-deployer-heroku?branch=master&svg=true)](https://ci.appveyor.com/project/tommy351/hexo-deployer-heroku/branch/master) Heroku deployer plugin for [Hexo]. @@ -40,4 +39,4 @@ $ rm -rf .deploy_heroku MIT -[Hexo]: http://hexo.io/ \ No newline at end of file +[Hexo]: https://hexo.io/ \ No newline at end of file diff --git a/appveyor.yml b/appveyor.yml deleted file mode 100644 index 579fbd8..0000000 --- a/appveyor.yml +++ /dev/null @@ -1,38 +0,0 @@ -# Fix line endings in Windows. (runs before repo cloning) -init: - - git config --global core.autocrlf input - - git config --global user.email "you@example.com" - - git config --global user.name "Your Name" - -# Test against these versions of Node.js. -environment: - matrix: - - nodejs_version: "8" - - nodejs_version: "10" - - nodejs_version: "12" - -matrix: - fast_finish: true - -# Install scripts. (runs after repo cloning) -install: - - ps: Install-Product node $env:nodejs_version - - npm install -g npm - - 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 93c312f..ec69fe5 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", @@ -25,27 +25,27 @@ "deploy", "deployer" ], - "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", "devDependencies": { - "bluebird": "^3.4.0", - "chai": "^4.2.0", - "eslint": "^6.1.0", - "eslint-config-hexo": "^4.1.0", - "mocha": "^7.1.1", - "nyc": "^15.0.0" + "bluebird": "^3.7.2", + "chai": "^4.3.4", + "eslint": "^8.6.0", + "eslint-config-hexo": "^5.0.0", + "mocha": "^7.2.0", + "nyc": "^15.1.0" }, "dependencies": { - "chalk": "^4.1.0", - "hexo-fs": "^2.0.0", - "hexo-util": "^2.1.0", - "moment": "^2.13.0", - "nunjucks": "^3.2.1" + "chalk": "^4.1.2", + "hexo-fs": "^2.0.1", + "hexo-util": "^2.5.0", + "moment": "^2.29.1", + "nunjucks": "^3.2.3" }, "engines": { - "node": ">=8.6.0" + "node": ">=12.13.0" } } From 9ec9381b11a344a90834256ecff1ecc9cb207a00 Mon Sep 17 00:00:00 2001 From: Thomas Date: Sat, 8 Jan 2022 09:00:57 +0100 Subject: [PATCH 2/2] fix git issue --- .github/workflows/tester.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/tester.yml b/.github/workflows/tester.yml index ea6d383..c1982af 100644 --- a/.github/workflows/tester.yml +++ b/.github/workflows/tester.yml @@ -18,6 +18,8 @@ jobs: node-version: ${{ matrix.node-version }} - name: Install Dependencies run: npm install + - name: git-config + run: git config --global user.email "you@example.com" && git config --global user.name "Your Name" - name: Test run: npm test -- --no-parallel env: @@ -36,6 +38,8 @@ jobs: node-version: ${{ matrix.node-version }} - name: Install Dependencies run: npm install + - name: git-config + run: git config --global user.email "you@example.com" && git config --global user.name "Your Name" - name: Coverage run: npm run test-cov env: