Skip to content

Commit de113a1

Browse files
committed
Switch to GitHub Actions CI
1 parent 436f661 commit de113a1

File tree

8 files changed

+213
-120
lines changed

8 files changed

+213
-120
lines changed

.github/dependabot.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "github-actions"
4+
directory: "/"
5+
schedule:
6+
interval: monthly

.github/workflows/codeql.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: "CodeQL"
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
- "!dependabot/**"
8+
pull_request:
9+
branches:
10+
- master
11+
- "!dependabot/**"
12+
schedule:
13+
- cron: "0 0 * * 0"
14+
workflow_dispatch:
15+
16+
jobs:
17+
analyze:
18+
name: Analyze
19+
runs-on: ubuntu-latest
20+
permissions:
21+
actions: read
22+
contents: read
23+
security-events: write
24+
25+
steps:
26+
- name: Clone repository
27+
uses: actions/checkout@v3
28+
with:
29+
persist-credentials: false
30+
31+
- name: Initialize CodeQL
32+
uses: github/codeql-action/init@v2
33+
with:
34+
languages: "javascript"
35+
queries: +security-and-quality
36+
37+
- name: Autobuild
38+
uses: github/codeql-action/autobuild@v2
39+
40+
- name: Perform CodeQL Analysis
41+
uses: github/codeql-action/analyze@v2
42+
with:
43+
category: "/language:javascript"

.github/workflows/lint.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Lint
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
- "!dependabot/**"
8+
pull_request:
9+
workflow_dispatch:
10+
11+
env:
12+
FORCE_COLOR: 2
13+
NODE: 18 # The Node.js version to run lint on
14+
15+
jobs:
16+
run:
17+
name: Lint
18+
runs-on: ubuntu-latest
19+
20+
steps:
21+
- name: Clone repository
22+
uses: actions/checkout@v3
23+
with:
24+
persist-credentials: false
25+
26+
- name: Set up Node.js
27+
uses: actions/setup-node@v3
28+
with:
29+
node-version: ${{ env.NODE }}
30+
cache: npm
31+
32+
- name: Install npm dependencies
33+
run: npm ci
34+
35+
- name: Run lint
36+
run: npm run lint

.github/workflows/test.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: Tests
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
- "!dependabot/**"
8+
pull_request:
9+
workflow_dispatch:
10+
11+
env:
12+
FORCE_COLOR: 2
13+
NODE_COV: 18 # The Node.js version to run coveralls on
14+
15+
jobs:
16+
run:
17+
name: Node ${{ matrix.node }} on ${{ matrix.os }}
18+
runs-on: ${{ matrix.os }}
19+
20+
strategy:
21+
fail-fast: false
22+
matrix:
23+
node: [10, 12, 14, 16, 18]
24+
os: [ubuntu-latest, windows-latest]
25+
26+
steps:
27+
- name: Clone repository
28+
uses: actions/checkout@v3
29+
with:
30+
persist-credentials: false
31+
32+
- name: Set up Node.js
33+
uses: actions/setup-node@v3
34+
with:
35+
node-version: ${{ matrix.node }}
36+
cache: npm
37+
38+
- name: Install npm dependencies
39+
run: npm ci
40+
41+
- name: Run tests with coverage
42+
run: npm run cover
43+
if: "!startsWith(matrix.os, 'windows')"
44+
45+
- name: Run tests
46+
run: npm run mocha
47+
if: startsWith(matrix.os, 'windows')
48+
49+
- name: Run Coveralls
50+
uses: coverallsapp/github-action@v2
51+
if: startsWith(matrix.os, 'ubuntu') && matrix.node == env.NODE_COV
52+
with:
53+
github-token: "${{ secrets.GITHUB_TOKEN }}"

.travis.yml

Lines changed: 0 additions & 16 deletions
This file was deleted.

0 commit comments

Comments
 (0)