Skip to content

Commit

Permalink
Use ghat to sync gh actions
Browse files Browse the repository at this point in the history
  • Loading branch information
voxpelli committed Mar 3, 2021
1 parent 8866159 commit f6a5c79
Show file tree
Hide file tree
Showing 4 changed files with 70 additions and 32 deletions.
32 changes: 23 additions & 9 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,29 @@
name: Linting
env: {}

on: [push]
# FILE GENERATED WITH: npx ghat voxpelli/ghatemplates/lint
# SOURCE: https://github.com/voxpelli/ghatemplates
# OPTIONS: {"set":["jobs.test.strategy.matrix.node_version=[12]"]}

name: Linting
on:
- push
- pull_request
jobs:
lint:
name: Static code analysis
runs-on: ubuntu-latest
test:
name: Node ${{ matrix.node_version }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
node_version:
- 12
os:
- ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
- name: Use Node.js ${{ matrix.node_version }}
uses: actions/setup-node@v2
with:
node-version: '12'
- run: npm install
- run: npx run-p check:*
node-version: ${{ matrix.node_version }}
- run: yarn install
- run: yarn run check
59 changes: 37 additions & 22 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
@@ -1,31 +1,46 @@
name: Node CI
env: {}

on: [push]
# FILE GENERATED WITH: npx ghat voxpelli/ghatemplates/nodejs-coveralls
# SOURCE: https://github.com/voxpelli/ghatemplates
# OPTIONS: {"set":["jobs.test.strategy.matrix.node_version=[10,12,14,15]","jobs.test.strategy.matrix.os=[ubuntu-latest]"]}

name: Node CI
on:
- push
- pull_request
jobs:
test:
name: Node ${{ matrix.node_version }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
node_version: [10, 12, 13]
os: [ubuntu-latest]

node_version:
- 10
- 12
- 14
- 15
os:
- ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node_version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node_version }}
- run: yarn install
- run: yarn run test-ci
- name: Coveralls Parallel
uses: coverallsapp/github-action@v1.1.2
with:
github-token: ${{ secrets.github_token }}
flag-name: run-${{ matrix.os }}-${{ matrix.node_version }}
parallel: true
coverage:
needs: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node_version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node_version }}
- run: npm install
- run: npx run-s test:*
- name: Coveralls Parallel
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.github_token }}
parallel: true
- name: Coveralls Finished
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.github_token }}
parallel-finished: true
- name: Coveralls Finished
uses: coverallsapp/github-action@v1.1.2
with:
github-token: ${{ secrets.github_token }}
parallel-finished: true
6 changes: 5 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,12 @@
"check:dependency-check": "dependency-check 'lib/**/*.js' 'test/**/*.js' --no-dev",
"check:installed-check": "installed-check -i eslint -i installed-check",
"check:lint": "eslint .",
"check": "run-p check:*",
"start": "node .",
"sync-gh-actions": "ghat",
"test:mocha": "NODE_ENV=test DOTENV_FILE=test/test.env nyc --reporter=lcov --reporter text mocha 'test/**/*.spec.js'",
"test": "run-p check:* && run-p test:*"
"test-ci": "run-s test:*",
"test": "run-s check test:*"
},
"husky": {
"hooks": {
Expand All @@ -43,6 +46,7 @@
"eslint-plugin-node": "^11.0.0",
"eslint-plugin-promise": "^4.2.1",
"eslint-plugin-standard": "^4.0.0",
"ghat": "^0.14.0",
"husky": "^4.3.8",
"installed-check": "^4.0.0",
"mocha": "^7.0.1",
Expand Down
5 changes: 5 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1683,6 +1683,11 @@ getpass@^0.1.1:
dependencies:
assert-plus "^1.0.0"

ghat@^0.14.0:
version "0.14.0"
resolved "https://registry.yarnpkg.com/ghat/-/ghat-0.14.0.tgz#8aa456c7a0f61ba34d62fd27042cdd462a8dccbe"
integrity sha512-M5Pz4F+ncj4t5ioJVsco9jjtCwdyW0hsblyXtS0MXANrYo7N0sWoROoxV4ni2KEBH4o8+dKAhT2zsQHmfZDCtQ==

github-publish@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/github-publish/-/github-publish-3.0.0.tgz#eafde9743aeb0619f93d6a54eb2fb9fe174078d5"
Expand Down

0 comments on commit f6a5c79

Please sign in to comment.