Skip to content

Commit

Permalink
[Tests] migrate from travis to GHA
Browse files Browse the repository at this point in the history
  • Loading branch information
ljharb committed Sep 21, 2024
1 parent e8f0d80 commit 757b4e3
Show file tree
Hide file tree
Showing 7 changed files with 85 additions and 39 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/node-aught.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: 'Tests: node.js < 10'

on: [pull_request, push]

permissions:
contents: read

jobs:
tests:
uses: ljharb/actions/.github/workflows/node.yml@main
with:
range: '>= 6 < 10'
type: minors
command: npm run ci-test
10 changes: 10 additions & 0 deletions .github/workflows/node-pretest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name: 'Tests: pretest/posttest'

on: [pull_request, push]

permissions:
contents: read

jobs:
tests:
uses: ljharb/actions/.github/workflows/pretest.yml@main
14 changes: 14 additions & 0 deletions .github/workflows/node-tens.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: 'Tests: node.js >= 10'

on: [pull_request, push]

permissions:
contents: read

jobs:
tests:
uses: ljharb/actions/.github/workflows/node.yml@main
with:
range: '>= 10'
type: minors
command: npm run ci-test
22 changes: 22 additions & 0 deletions .github/workflows/rebase.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Automatic Rebase

on: [pull_request_target]

permissions:
contents: read

jobs:
_:
permissions:
contents: write # for ljharb/rebase to push code to rebase
pull-requests: read # for ljharb/rebase to get info about PR

name: "Automatic Rebase"

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: ljharb/rebase@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
18 changes: 18 additions & 0 deletions .github/workflows/require-allow-edits.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Require “Allow Edits”

on: [pull_request_target]

permissions:
contents: read

jobs:
_:
permissions:
pull-requests: read # for ljharb/require-allow-edits to check 'allow edits' on PR

name: "Require “Allow Edits”"

runs-on: ubuntu-latest

steps:
- uses: ljharb/require-allow-edits@main
35 changes: 0 additions & 35 deletions .travis.yml

This file was deleted.

11 changes: 7 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,16 @@
"browser": "./lib/browser",
"typings": "./index.d.ts",
"scripts": {
"pretest": "rimraf coverage test/tmp",
"test": "istanbul cover test/run.js",
"posttest": "istanbul report lcov text",
"pretest": "npm run lint",
"pretests-only": "rimraf coverage test/tmp",
"tests-only": "istanbul cover test/run.js",
"posttests-only": "istanbul report lcov text",
"test": "npm run tests-only",
"posttest": "npx npm@'>=10.2' audit --production",
"lint": "eslint --ext=js,mjs .",
"report": "istanbul report lcov text",
"ci-lint": "is-node-modern 8 && npm run lint || is-node-not-modern 8",
"ci-test": "npm run test && npm run browser && npm run report",
"ci-test": "npm run tests-only && npm run browser && npm run report",
"predebug": "rimraf coverage test/tmp",
"debug": "verbose=1 ./test/run.js",
"browser": "browserify -t browserify-istanbul test/run-browser.js | obake --coverage",
Expand Down

0 comments on commit 757b4e3

Please sign in to comment.