Skip to content

Commit 806eda7

Browse files
committed
[Tests] migrate from travis to GHA
1 parent 3a9d480 commit 806eda7

File tree

7 files changed

+85
-40
lines changed

7 files changed

+85
-40
lines changed

.github/workflows/node-aught.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: 'Tests: node.js < 10'
2+
3+
on: [pull_request, push]
4+
5+
permissions:
6+
contents: read
7+
8+
jobs:
9+
tests:
10+
uses: ljharb/actions/.github/workflows/node.yml@main
11+
with:
12+
range: '>= 0.12 < 10'
13+
type: minors
14+
command: npm run ci-test

.github/workflows/node-pretest.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
name: 'Tests: pretest/posttest'
2+
3+
on: [pull_request, push]
4+
5+
permissions:
6+
contents: read
7+
8+
jobs:
9+
tests:
10+
uses: ljharb/actions/.github/workflows/pretest.yml@main

.github/workflows/node-tens.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: 'Tests: node.js >= 10'
2+
3+
on: [pull_request, push]
4+
5+
permissions:
6+
contents: read
7+
8+
jobs:
9+
tests:
10+
uses: ljharb/actions/.github/workflows/node.yml@main
11+
with:
12+
range: '>= 10'
13+
type: minors
14+
command: npm run ci-test

.github/workflows/rebase.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Automatic Rebase
2+
3+
on: [pull_request_target]
4+
5+
permissions:
6+
contents: read
7+
8+
jobs:
9+
_:
10+
permissions:
11+
contents: write # for ljharb/rebase to push code to rebase
12+
pull-requests: read # for ljharb/rebase to get info about PR
13+
14+
name: "Automatic Rebase"
15+
16+
runs-on: ubuntu-latest
17+
18+
steps:
19+
- uses: actions/checkout@v3
20+
- uses: ljharb/rebase@master
21+
env:
22+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Require “Allow Edits”
2+
3+
on: [pull_request_target]
4+
5+
permissions:
6+
contents: read
7+
8+
jobs:
9+
_:
10+
permissions:
11+
pull-requests: read # for ljharb/require-allow-edits to check 'allow edits' on PR
12+
13+
name: "Require “Allow Edits”"
14+
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- uses: ljharb/require-allow-edits@main

.travis.yml

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

package.json

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,16 @@
1111
"browser": "./lib/browser",
1212
"typings": "./index.d.ts",
1313
"scripts": {
14-
"pretest": "rimraf coverage test/tmp",
15-
"test": "istanbul cover test/run.js",
16-
"posttest": "istanbul report lcov text",
14+
"pretest": "npm run lint",
15+
"pretests-only": "rimraf coverage test/tmp",
16+
"tests-only": "istanbul cover test/run.js",
17+
"posttests-only": "istanbul report lcov text",
18+
"test": "npm run tests-only",
19+
"posttest": "npx npm@'>=10.2' audit --production",
1720
"lint": "eslint --ext=js,mjs .",
1821
"report": "istanbul report lcov text",
1922
"ci-lint": "is-node-modern 8 && npm run lint || is-node-not-modern 8",
20-
"ci-test": "npm run test && npm run browser && npm run report",
23+
"ci-test": "npm run tests-only && npm run browser && npm run report",
2124
"predebug": "rimraf coverage test/tmp",
2225
"debug": "verbose=1 ./test/run.js",
2326
"browser": "browserify -t browserify-istanbul test/run-browser.js | obake --coverage",

0 commit comments

Comments
 (0)