chore: switch to github ci

This commit is contained in:
Dylan Piercey 2021-03-17 20:22:28 -07:00 committed by Dylan Piercey
parent 031ca0d93f
commit ec89afd5fb
4 changed files with 35 additions and 11 deletions

30
.github/workflows/ci.yml vendored Normal file
View File

@ -0,0 +1,30 @@
name: CI
on:
pull_request:
paths-ignore: ["*.md"]
push:
branches: ["main"]
paths-ignore: ["*.md"]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node: [12.x, 14.x, 15.x]
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Use node@${{ matrix.node }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node }}
- name: Install dependencies
run: npm ci
- name: Lint code
run: npm run lint
- name: Run tests
run: npm run ci:test
- name: Report code coverage
run: npm run ci:report

View File

@ -1,8 +0,0 @@
sudo: false
node_js:
- "10"
- "12"
language: node_js
install: "npm ci"
script: "npm run ci:test"
after_success: "npm run ci:codecov"

View File

@ -15,7 +15,7 @@
"format": "eslint -f visualstudio --fix . && prettier \"**/*.{json,md,js}\" --write",
"lint": "eslint -f visualstudio . && prettier \"**/*.{js,json,css,md}\" -l",
"ci:test": "npm run lint && cross-env MARKO_DEBUG=1 NODE_ENV=test nyc --reporter=text npm test",
"ci:codecov": "nyc report --reporter=text-lcov > coverage.lcov && codecov",
"ci:report": "nyc report --reporter=text-lcov > coverage.lcov && codecov",
"report": "nyc report --reporter=html && open ./coverage/index.html",
"set-entry": "lerna exec -- dot-json package.json main $\\(dot-json package.json $ENTRY\\)"
},

View File

@ -9,7 +9,9 @@
<p align="center">
<a href="https://www.npmjs.com/package/marko"><img alt="NPM" src="https://img.shields.io/npm/v/marko.svg"/></a>
<a href="https://discord.gg/RFGxYGs"><img alt="Discord" src="https://img.shields.io/badge/discord-chat-7188da.svg"/></a>
<a href="https://travis-ci.org/marko-js/marko"><img alt="Build Status" src="https://travis-ci.org/marko-js/marko.svg?branch=master"/></a>
<a href="https://github.com/marko-js/marko/actions/workflows/ci.yml">
<img src="https://github.com/marko-js/marko/actions/workflows/ci.yml/badge.svg" alt="Build status"/>
</a>
<a href="https://codecov.io/gh/marko-js/marko"><img alt="Coverage Status" src="https://codecov.io/gh/marko-js/marko/branch/master/graph/badge.svg"/></a>
<a href="http://npm-stat.com/charts.html?package=marko"><img alt="Downloads" src="https://img.shields.io/npm/dm/marko.svg"/></a>
</p>
@ -89,7 +91,7 @@ module.exports = {
},
increment() {
this.state.count++;
}
},
};
```