Skip to content

Commit 2c55804

Browse files
authored
ci: Add GitHub Actions (#31)
1 parent 59ccadd commit 2c55804

File tree

3 files changed

+44
-2
lines changed

3 files changed

+44
-2
lines changed

.github/workflows/ci.yml

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches-ignore:
6+
- 'dependabot/**'
7+
pull_request:
8+
9+
jobs:
10+
build:
11+
runs-on: ${{ matrix.os }}
12+
strategy:
13+
matrix:
14+
node:
15+
- 12
16+
- 14
17+
- 16
18+
- 17
19+
os: [ubuntu-latest, macOS-latest, windows-latest]
20+
21+
steps:
22+
- name: 🛑 Cancel Previous Runs
23+
uses: styfle/[email protected]
24+
with:
25+
access_token: ${{ secrets.GITHUB_TOKEN }}
26+
27+
- name: ⬇️ Checkout
28+
uses: actions/checkout@v2
29+
30+
- name: ⎔ Setup node ${{ matrix.node }}
31+
uses: actions/setup-node@v2
32+
with:
33+
node-version: ${{ matrix.node }}
34+
cache: npm
35+
36+
- name: 📥 Download deps
37+
run: npm ci
38+
39+
- name: Test
40+
run: npm test

gulpfile.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ gulp.task('lint', function () {
1111
.pipe(jshint.reporter('fail'));
1212
});
1313

14-
gulp.task('test', ['lint'], function () {
14+
gulp.task('test', function () {
1515
var options = {
1616
htmlhintrc: './.htmlhintrc',
1717
ignores: {
@@ -29,3 +29,5 @@ gulp.task('test', ['lint'], function () {
2929
.pipe(htmlhint_inline.reporter())
3030
.pipe(htmlhint_inline.reporter('fail'));
3131
});
32+
33+
gulp.task('default', gulp.series('lint', 'test'));

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
"node": ">= 4"
2020
},
2121
"scripts": {
22-
"test": "gulp test"
22+
"test": "gulp"
2323
},
2424
"dependencies": {
2525
"gulp-util": "^3.0.8",

0 commit comments

Comments
 (0)