Skip to content

Commit

Permalink
merge(#10): from curbengh/gh-actions
Browse files Browse the repository at this point in the history
  • Loading branch information
SukkaW authored Jul 24, 2020
2 parents ae79530 + f226c57 commit e6aa397
Show file tree
Hide file tree
Showing 6 changed files with 42 additions and 24 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/tester.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Tester

on: [push, pull_request]

jobs:
tester:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
node-version: ['10.x', '12.x', '14.x']
fail-fast: false
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Cache NPM dependencies
uses: actions/cache@v1
with:
path: node_modules
key: ${{ runner.os }}-npm-cache
restore-keys: ${{ runner.os }}-npm-cache
- name: Install Dependencies
run: npm install
- name: Test
run: npm run test
env:
CI: true
7 changes: 7 additions & 0 deletions .mocharc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
color: true
reporter: spec
ui: bdd
full-trace: true
exit: true
require:
- "chai/register-should"
13 changes: 0 additions & 13 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion lib/filter.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ module.exports = function(data) {
config.nofollow.exclude = [exclude];
}

const filterExternal = (data) => {
const filterExternal = data => {
return data.replace(/<a.*?(href=['"](.*?)['"]).*?>/gi, (str, hrefStr, href) => {
if (!isExternal(href, config)) return str;

Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"index.js"
],
"engines": {
"node": ">= 8.6.0"
"node": ">= 10.13.0"
},
"scripts": {
"eslint": "eslint .",
Expand All @@ -33,9 +33,9 @@
"homepage": "https://github.com/hexojs/hexo-filter-nofollow#readme",
"devDependencies": {
"chai": "^4.2.0",
"eslint": "^6.2.2",
"eslint-config-hexo": "^3.0.0",
"eslint": "^7.5.0",
"eslint-config-hexo": "^4.1.0",
"hexo": "hexojs/hexo",
"mocha": "^6.2.0"
"mocha": "^8.0.1"
}
}
6 changes: 0 additions & 6 deletions test/mocha.opts

This file was deleted.

0 comments on commit e6aa397

Please sign in to comment.