forked from davewasmer/devcert
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: GitHub Actions (davewasmer#8)
- Loading branch information
1 parent
eaa456b
commit 47147c4
Showing
2 changed files
with
158 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,142 @@ | ||
name: Node.js CI | ||
|
||
on: [push, pull_request] | ||
|
||
env: | ||
CI: true | ||
|
||
jobs: | ||
build_12: | ||
name: build | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
node-version: [12.x] | ||
|
||
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 | ||
yarn build | ||
mkdir ../sync | ||
tar -cf ../sync/build.tar . | ||
- name: Upload build | ||
uses: actions/upload-artifact@v1 | ||
with: | ||
name: build_${{ matrix.node-version }} | ||
path: ../sync | ||
build: | ||
name: build | ||
runs-on: ubuntu-latest | ||
needs: [build_12, lint] | ||
|
||
strategy: | ||
matrix: | ||
node-version: [8.11.3, 8.x, 10.x, 13.x] | ||
|
||
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 --ignore-optional | ||
- run: yarn build | ||
- run: | | ||
mkdir ../sync | ||
tar -cf ../sync/build.tar . | ||
- name: Upload build | ||
uses: actions/upload-artifact@v1 | ||
with: | ||
name: build_${{ matrix.node-version }} | ||
path: ../sync | ||
commit_lint: | ||
name: CommitLint | ||
needs: build_12 | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
- name: Commit Linter | ||
uses: wagoid/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
lint: | ||
name: ESLint | ||
needs: build_12 | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Download build | ||
uses: actions/download-artifact@v1 | ||
with: | ||
name: build_12.x | ||
path: ../sync | ||
- run: tar -xf ../sync/build.tar . | ||
- run: yarn lint | ||
updated_api_report: | ||
name: API Report up-to-date | ||
needs: build_12 | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Download build | ||
uses: actions/download-artifact@v1 | ||
with: | ||
name: build_12.x | ||
path: ../sync | ||
- run: tar -xf ../sync/build.tar . | ||
- run: | | ||
echo "API reports that are out of date: " && git diff --exit-code --name-only HEAD 'etc/*.md' && echo "NONE: this PR is ready for review\!" | ||
- run: git diff -s --exit-code HEAD -- 'etc/*.md' | ||
updated_docs: | ||
name: Docs up-to-date | ||
needs: build_12 | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Download build | ||
uses: actions/download-artifact@v1 | ||
with: | ||
name: build_12.x | ||
path: ../sync | ||
- run: tar -xf ../sync/build.tar . | ||
- run: | | ||
echo "Documentation files that are out of date: " && git diff --exit-code --name-only HEAD 'docs/**/*.md' && echo "NONE: this PR is ready for review\!" | ||
- run: git diff -s --exit-code HEAD -- 'docs/**/*.md' | ||
basic_test: | ||
strategy: | ||
matrix: | ||
node-version: [12.x] | ||
name: node LTS tests | ||
needs: [build_12] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Download build | ||
uses: actions/download-artifact@v1 | ||
with: | ||
name: build_${{ matrix.node-version }} | ||
path: ../sync | ||
- run: tar -xf ../sync/build.tar . | ||
- run: yarn test | ||
compat_test: | ||
strategy: | ||
matrix: | ||
node-version: [8.11.3, 8.x, 10.x, 13.x] | ||
name: node tests | ||
needs: | ||
[build, commit_lint, lint, basic_test, updated_docs, updated_api_report] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Download build | ||
uses: actions/download-artifact@v1 | ||
with: | ||
name: build_${{ matrix.node-version }} | ||
path: ../sync | ||
- run: tar -xf ../sync/build.tar . | ||
- run: yarn test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,27 +5,38 @@ | |
"main": "dist/index.js", | ||
"types": "dist/index.d.ts", | ||
"scripts": { | ||
"build": "tsc", | ||
"clean": "rimraf dist", | ||
"build": "yarn clean && yarn build:ts", | ||
"build:ts": "tsc", | ||
"lint": "eslint src --ext ts", | ||
"prepublishOnly": "yarn build", | ||
"test": "yarn lint" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/davewasmer/devcert.git" | ||
"url": "git+https://github.com/mike-north/devcert.git" | ||
}, | ||
"keywords": [ | ||
"ssl", | ||
"certificate", | ||
"openssl", | ||
"trust" | ||
], | ||
"author": "Dave Wasmer", | ||
"author": { | ||
"name": "Mike North", | ||
"email": "[email protected]", | ||
"url": "https://mike.works" | ||
}, | ||
"license": "MIT", | ||
"contributors": [ | ||
{ | ||
"name": "Dave Wasmer" | ||
} | ||
], | ||
"bugs": { | ||
"url": "https://github.com/davewasmer/devcert/issues" | ||
"url": "https://github.com/mike-north/devcert/issues" | ||
}, | ||
"homepage": "https://github.com/davewasmer/devcert#readme", | ||
"homepage": "https://github.com/mike-north/devcert#readme", | ||
"devDependencies": { | ||
"@types/command-exists": "^1.2.0", | ||
"@types/configstore": "^2.1.1", | ||
|