Skip to content
This repository was archived by the owner on Oct 9, 2023. It is now read-only.

Commit 3d7609a

Browse files
committed
[Tests] migrate tests to Github Actions
1 parent 89a0aac commit 3d7609a

File tree

8 files changed

+75
-43
lines changed

8 files changed

+75
-43
lines changed

.github/workflows/node-aught.yml

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: 'Tests: node.js < 10'
2+
3+
on: [pull_request, push]
4+
5+
jobs:
6+
tests:
7+
uses: ljharb/actions/.github/workflows/node.yml@main
8+
with:
9+
range: '>= 4 < 10' # node < 4 breaks due to babel; we'll need staged builds for this
10+
type: majors
11+
command: npm run tests-only
12+
skip-ls-check: true
13+
14+
node:
15+
name: 'node < 10'
16+
needs: [tests]
17+
runs-on: ubuntu-latest
18+
steps:
19+
- run: 'echo tests completed'

.github/workflows/node-pretest.yml

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
name: 'Tests: pretest/posttest'
2+
3+
on: [pull_request, push]
4+
5+
jobs:
6+
tests:
7+
uses: ljharb/actions/.github/workflows/pretest.yml@main

.github/workflows/node-tens.yml

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: 'Tests: node.js >= 10'
2+
3+
on: [pull_request, push]
4+
5+
jobs:
6+
tests:
7+
uses: ljharb/actions/.github/workflows/node.yml@main
8+
with:
9+
range: '>= 10'
10+
type: majors
11+
command: npm run tests-only
12+
13+
node:
14+
name: 'node >= 10'
15+
needs: [tests]
16+
runs-on: ubuntu-latest
17+
steps:
18+
- run: 'echo tests completed'

.github/workflows/rebase.yml

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: Automatic Rebase
2+
3+
on: [pull_request_target]
4+
5+
jobs:
6+
_:
7+
name: "Automatic Rebase"
8+
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- uses: actions/checkout@v2
13+
- uses: ljharb/rebase@master
14+
env:
15+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
name: Require “Allow Edits”
2+
3+
on: [pull_request_target]
4+
5+
jobs:
6+
_:
7+
name: "Require “Allow Edits”"
8+
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- uses: ljharb/require-allow-edits@main

.npmrc

+1
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
package-lock=false
2+
audit-level=critical

.travis.yml

-43
This file was deleted.

package.json

+3
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,13 @@
99
"clean": "rimraf lib",
1010
"prebuild": "npm run clean",
1111
"build": "babel src -d lib",
12+
"prelint": "npm run build",
1213
"lint": "eslint src test",
1314
"pretest": "npm run --silent lint",
1415
"test": "npm run coverage",
1516
"pretests-only": "npm run build",
1617
"tests-only": "npm run test:quick",
18+
"posttest": "aud --production",
1719
"precoverage": "npm run build",
1820
"coverage": "babel-node node_modules/.bin/istanbul cover --report html node_modules/.bin/_mocha -- -R tap test/init.js test/*-test.js",
1921
"postcoverage": "npm run cover:check",
@@ -47,6 +49,7 @@
4749
},
4850
"homepage": "https://github.com/airbnb/hypernova",
4951
"devDependencies": {
52+
"aud": "^2.0.0",
5053
"babel-cli": "^6.26.0",
5154
"babel-plugin-add-module-exports": "^0.2.1",
5255
"babel-plugin-transform-replace-object-assign": "^1.0.0",

0 commit comments

Comments
 (0)