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/linter.yml b/.github/workflows/linter.yml new file mode 100644 index 0000000..2ddfe8e --- /dev/null +++ b/.github/workflows/linter.yml @@ -0,0 +1,27 @@ +name: Linter + +on: [push, pull_request] + +jobs: + linter: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Use Node.js 14.x + uses: actions/setup-node@v2 + with: + node-version: '14.x' + - name: Cache NPM dependencies + uses: actions/cache@v2 + with: + path: node_modules + key: ${{ runner.OS }}-npm-cache + restore-keys: | + ${{ runner.OS }}-npm-cache + - name: Install Dependencies + run: npm install + - name: Lint + run: | + npm run eslint + env: + CI: true diff --git a/.github/workflows/tester.yml b/.github/workflows/tester.yml new file mode 100644 index 0000000..dcef102 --- /dev/null +++ b/.github/workflows/tester.yml @@ -0,0 +1,58 @@ +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@v1 + with: + node-version: ${{ matrix.node-version }} + - name: Cache NPM dependencies + uses: actions/cache@v2 + 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 + 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: Cache NPM dependencies + uses: actions/cache@v2 + with: + path: node_modules + key: ${{ runner.os }}-npm-cache + restore-keys: ${{ runner.os }}-npm-cache + - 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 }} diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 4ef1881..0000000 --- a/.travis.yml +++ /dev/null @@ -1,18 +0,0 @@ -language: node_js - -sudo: false - -cache: false - -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 0136e45..dabb06f 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,12 @@ # [EJS] renderer -[![Build Status](https://travis-ci.org/hexojs/hexo-renderer-ejs.svg?branch=master)](https://travis-ci.org/hexojs/hexo-renderer-ejs) +[![Build Status](https://github.com/hexojs/hexo-renderer-ejs/workflows/Tester/badge.svg?branch=master)](https://github.com/hexojs/hexo-renderer-ejs/actions?query=workflow%3ATester) [![NPM version](https://badge.fury.io/js/hexo-renderer-ejs.svg)](https://www.npmjs.com/package/hexo-renderer-ejs) [![Coverage Status](https://img.shields.io/coveralls/hexojs/hexo-renderer-ejs.svg)](https://coveralls.io/r/hexojs/hexo-renderer-ejs?branch=master) Add support for [EJS]. -**Now works with EJS v2!** +**Now works with EJS v3!** ## Install diff --git a/package.json b/package.json index e0aa5a7..2eb11b8 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" @@ -27,17 +27,17 @@ ], "license": "MIT", "dependencies": { - "ejs": "^3.0.1" + "ejs": "^3.1.6" }, "devDependencies": { - "chai": "^4.2.0", - "eslint": "^7.0.0", - "eslint-config-hexo": "^4.0.0", - "hexo-fs": "^3.0.1", - "mocha": "^8.0.1", - "nyc": "^15.0.0" + "chai": "^4.3.4", + "eslint": "^7.32.0", + "eslint-config-hexo": "^4.2.0", + "hexo-fs": "^3.1.0", + "mocha": "^8.4.0", + "nyc": "^15.1.0" }, "engines": { - "node": ">=10.13.0" + "node": ">=12" } }