-
Notifications
You must be signed in to change notification settings - Fork 248
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(build): configure CI/CD with GitHub actions
Fixes #454
- Loading branch information
Jonathan Ginsburg
committed
Dec 1, 2021
1 parent
e5af8dc
commit 02ff305
Showing
4 changed files
with
98 additions
and
23 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,31 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
main: | ||
name: Test and Release | ||
runs-on: ubuntu-latest | ||
env: | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
GITHUB_TOKEN: ${{ secrets.KARMARUNNERBOT_GITHUB_TOKEN }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
token: ${{ env.GITHUB_TOKEN }} | ||
fetch-depth: 0 | ||
- uses: actions/setup-node@v2 | ||
with: | ||
node-version: 12 | ||
cache: npm | ||
- run: npm ci | ||
- run: | | ||
npm run commitlint -- \ | ||
--verbose \ | ||
--from `git merge-base origin/master $GITHUB_SHA` | ||
- run: npm run lint | ||
- run: npm run test | ||
- run: npm run release |
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,63 @@ | ||
name: Test | ||
|
||
on: | ||
push: | ||
branches-ignore: | ||
- master | ||
pull_request: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
linux: | ||
name: "Node ${{ matrix.node }} on Linux: Test and Lint" | ||
runs-on: ubuntu-latest | ||
env: | ||
DISPLAY: ":0" | ||
strategy: | ||
matrix: | ||
node: | ||
- 10 | ||
- 12 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
- uses: actions/setup-node@v2 | ||
with: | ||
node-version: ${{ matrix.node }} | ||
cache: npm | ||
- uses: browser-actions/setup-firefox@latest | ||
with: | ||
firefox-version: "latest" | ||
- run: | | ||
sudo apt-get install xvfb && \ | ||
Xvfb $DISPLAY &> /dev/null & | ||
- run: npm ci | ||
- run: | | ||
npm run commitlint -- \ | ||
--verbose \ | ||
--from `git merge-base origin/master $GITHUB_SHA` | ||
- run: npm run lint | ||
- run: npm run test | ||
- run: npm run examples | ||
windows: | ||
name: "Node ${{ matrix.node }} on Windows: Test and Lint" | ||
runs-on: windows-latest | ||
defaults: | ||
run: | ||
shell: bash | ||
strategy: | ||
matrix: | ||
node: | ||
- 10 | ||
- 12 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-node@v2 | ||
with: | ||
node-version: ${{ matrix.node }} | ||
cache: npm | ||
- run: npm ci | ||
- run: npm run test | ||
- run: npm run examples |
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
|
@@ -8,7 +8,9 @@ | |
"test": "mocha", | ||
"update-contributors": "grunt contributors", | ||
"examples": "grunt karma", | ||
"semantic-release": "semantic-release" | ||
"semantic-release": "semantic-release", | ||
"release": "npm run update-contributors && semantic-release", | ||
"commitlint": "commitlint" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
|
@@ -149,4 +151,4 @@ | |
"Petar Manev <[email protected]>", | ||
"Robin Böhm <[email protected]>" | ||
] | ||
} | ||
} |