Skip to content

Commit

Permalink
Merge pull request airbnb#169 from airbnb/actions
Browse files Browse the repository at this point in the history
[Tests] migrate tests to Github Actions
  • Loading branch information
lencioni authored Apr 12, 2022
2 parents c46c10f + 1cf9246 commit 7efb9cd
Show file tree
Hide file tree
Showing 6 changed files with 61 additions and 57 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/node-pretest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
name: 'Tests: pretest/posttest'

on: [pull_request, push]

jobs:
tests:
uses: ljharb/actions/.github/workflows/pretest.yml@main

18 changes: 18 additions & 0 deletions .github/workflows/node.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: 'Tests: node.js'

on: [pull_request, push]

jobs:
tests:
uses: ljharb/actions/.github/workflows/node.yml@main
with:
range: '>= 0.8'
type: majors
command: npm run tests-only

node:
name: 'node.js tests'
needs: [tests]
runs-on: ubuntu-latest
steps:
- run: 'echo tests completed'
15 changes: 15 additions & 0 deletions .github/workflows/rebase.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Automatic Rebase

on: [pull_request_target]

jobs:
_:
name: "Automatic Rebase"

runs-on: ubuntu-latest

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

on: [pull_request_target]

jobs:
_:
name: "Require “Allow Edits”"

runs-on: ubuntu-latest

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

This file was deleted.

13 changes: 8 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@
"main": "index.js",
"scripts": {
"prepublish": "safe-publish-latest",
"pretest": "npm run --silent lint",
"test": "npm run --silent tests-only",
"tests-only": "mocha test/*.js --reporter spec",
"lint": "eslint *.js test/*.js",
"pretest": "npm run lint",
"test": "npm run tests-only",
"tests-only": "nyc mocha test/*.js --reporter spec",
"posttest": "aud --production",
"lint": "eslint .",
"docs": "docco -o docs/ index.js"
},
"repository": {
Expand All @@ -33,12 +34,14 @@
"warning": "^4.0.3"
},
"devDependencies": {
"chai": "^4.3.4",
"aud": "^2.0.0",
"chai": "^3.5.0",
"docco": "^0.7.0",
"eslint": "^7.32.0",
"eslint-config-airbnb-base": "^14.2.1",
"eslint-plugin-import": "^2.23.4",
"mocha": "^3.5.3",
"nyc": "^10.3.2",
"safe-publish-latest": "^1.1.4",
"uglify-js": "^2.7.3"
},
Expand Down

0 comments on commit 7efb9cd

Please sign in to comment.