Skip to content

Commit

Permalink
💥 drop Node.js 6 and switch CI to GitHub Actions (#60)
Browse files Browse the repository at this point in the history
* 💥 drop Node.js 6 and switch CI to GitHub Actions
  • Loading branch information
mysticatea committed Nov 9, 2019
1 parent 93ce0ca commit 57c8624
Show file tree
Hide file tree
Showing 4 changed files with 89 additions and 35 deletions.
81 changes: 81 additions & 0 deletions .github/workflows/CI.yml
@@ -0,0 +1,81 @@
name: CI
on:
push:
branches: [master]
pull_request:
branches: [master]
schedule:
- cron: 0 0 * * 0

jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v1
with:
fetch-depth: 1
- name: Checkout submodules
run: git submodule update --init
- name: Install Node.js
uses: actions/setup-node@v1
with:
node-version: 12
- name: Install Packages
run: npm install
- name: Lint
run: npm run -s lint

test:
name: Test

strategy:
matrix:
eslint: [6, 5]
node: [13, 12, 10, 8, "8.10.0"]
exclude:
# Run ESLint 5 on only the LTS.
- node: 13
eslint: 5
- node: 10
eslint: 5
- node: 8
eslint: 5
- node: "8.10.0"
eslint: 5

runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v1
with:
fetch-depth: 1
- name: Checkout submodules
run: git submodule update --init
- name: Install Node.js v${{ matrix.node }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node }}
- name: Install Packages
run: npm install
- name: Install ESLint v${{ matrix.eslint }}
run: |
if [ ${{ matrix.eslint }} -eq 6 ]; then
cd test/fixtures/eslint
npm install
else
npm install --no-save eslint@5.16.0
cd test/fixtures/eslint
git checkout v5.16.0
npm install eslint-utils@1.4.0
npm install
fi
- name: Build
run: npm run -s build
- name: Test
run: npm run -s test:mocha
- name: Send Coverage
run: npm run -s codecov
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
28 changes: 0 additions & 28 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -2,7 +2,7 @@

[![npm version](https://img.shields.io/npm/v/vue-eslint-parser.svg)](https://www.npmjs.com/package/vue-eslint-parser)
[![Downloads/month](https://img.shields.io/npm/dm/vue-eslint-parser.svg)](http://www.npmtrends.com/vue-eslint-parser)
[![Build Status](https://travis-ci.org/mysticatea/vue-eslint-parser.svg?branch=master)](https://travis-ci.org/mysticatea/vue-eslint-parser)
[![Build Status](https://github.com/mysticatea/vue-eslint-parser/workflows/CI/badge.svg)](https://github.com/mysticatea/vue-eslint-parser/actions)
[![Coverage Status](https://codecov.io/gh/mysticatea/vue-eslint-parser/branch/master/graph/badge.svg)](https://codecov.io/gh/mysticatea/vue-eslint-parser)
[![Dependency Status](https://david-dm.org/mysticatea/vue-eslint-parser.svg)](https://david-dm.org/mysticatea/vue-eslint-parser)

Expand Down
13 changes: 7 additions & 6 deletions package.json
Expand Up @@ -3,20 +3,20 @@
"version": "6.0.5",
"description": "The ESLint custom parser for `.vue` files.",
"engines": {
"node": ">=6.5"
"node": ">=8.10"
},
"main": "index.js",
"files": [
"index.*"
],
"peerDependencies": {
"eslint": "^5.0.0 || ^6.0.0"
"eslint": ">=5.0.0"
},
"dependencies": {
"debug": "^4.1.1",
"eslint-scope": "^4.0.0 || ^5.0.0",
"eslint-visitor-keys": "^1.0.0",
"espree": "^5.0.0 || ^6.0.0",
"eslint-scope": "^5.0.0",
"eslint-visitor-keys": "^1.1.0",
"espree": "^6.1.2",
"esquery": "^1.0.1",
"lodash": "^4.17.15"
},
Expand Down Expand Up @@ -57,7 +57,8 @@
"lint": "node -e \"if(process.env.ESLINT=='5')process.exit(1)\" && eslint src test --ext .js,.ts || node -e \"if(process.env.ESLINT!='5')process.exit(1)\"",
"setup": "git submodule update --init && cd test/fixtures/eslint && npm install",
"pretest": "run-s build lint",
"test": "nyc mocha \"test/*.js\" --reporter dot --timeout 10000",
"test": "npm run -s test:mocha",
"test:mocha": "nyc mocha \"test/*.js\" --reporter dot --timeout 10000",
"preupdate-fixtures": "npm run -s build",
"update-fixtures": "node scripts/update-fixtures-ast.js",
"preversion": "npm test",
Expand Down

0 comments on commit 57c8624

Please sign in to comment.