Skip to content

Commit

Permalink
chore(ci): migrate to GitHub Actions from TravisCI (#50)
Browse files Browse the repository at this point in the history
  • Loading branch information
yoshinorin authored Jan 1, 2022
1 parent 8e9cc8e commit aca628a
Show file tree
Hide file tree
Showing 4 changed files with 60 additions and 22 deletions.
58 changes: 58 additions & 0 deletions .github/workflows/tester.yml
Original file line number Diff line number Diff line change
@@ -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@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
coverage:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
node-version: ['12.x']
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: Coverage
run: npm run test-cov
env:
CI: true
- name: Coveralls
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.github_token }}
20 changes: 0 additions & 20 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# hexo-front-matter

[![Build Status](https://travis-ci.org/hexojs/hexo-front-matter.svg?branch=master)](https://travis-ci.org/hexojs/hexo-front-matter)
[![Build Status](https://github.com/hexojs/hexo-front-matter/workflows/Tester/badge.svg)](https://github.com/hexojs/hexo-front-matter/actions?query=workflow%3ATester)
[![NPM version](https://badge.fury.io/js/hexo-front-matter.svg)](https://www.npmjs.com/package/hexo-front-matter)
[![Coverage Status](https://coveralls.io/repos/hexojs/hexo-front-matter/badge.svg?branch=master)](https://coveralls.io/r/hexojs/hexo-front-matter?branch=master)

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit aca628a

Please sign in to comment.