-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(ci): implement github actions, semantic release (#5)
* feat(ci): implement github actions, semantic release Also fix lint errors, upgrade deps * fix(ci): skip code climate, sauce labs until we add tests Signed-off-by: Patrik Kullman <[email protected]>
- Loading branch information
1 parent
78dbe4a
commit 2320ccd
Showing
5 changed files
with
9,210 additions
and
943 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,53 @@ | ||
name: Github CI | ||
on: | ||
pull_request: | ||
branches: | ||
- master | ||
push: | ||
branches: | ||
- master | ||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@master | ||
|
||
- name: Use Node.js 10.x | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: 10.x | ||
|
||
- name: Install | ||
run: npm ci | ||
|
||
- name: Lint commit messages | ||
run: npx commitlint --from origin/master --to HEAD | ||
|
||
- name: ESLint | ||
run: node index.js | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Test and report | ||
env: | ||
CC_TEST_REPORTER_ID: 7b59d48d068bcdb14ae1b91f5290389a98328823eefc7f2ff657ae512b040909 | ||
GIT_BRANCH: ${{ github.ref }} | ||
GIT_COMMIT_SHA: ${{ github.event.pull_request.head.sha || github.sha }} | ||
NEO_CC_URL: https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 | ||
NEO_CC: ./cc-test-reporter | ||
SAUCE_USERNAME: ${{ secrets.SAUCE_USERNAME }} | ||
SAUCE_ACCESS_KEY: ${{ secrets.SAUCE_ACCESS_KEY }} | ||
run: | | ||
# ([[ -e $NEO_CC ]] || curl -L $NEO_CC_URL > $NEO_CC) && chmod +x $NEO_CC | ||
# $NEO_CC before-build | ||
# npm run test $([ -z "$SAUCE_ACCESS_KEY"] && echo "-- --skip-plugin sauce") | ||
# $NEO_CC after-build --exit-code $? | ||
npm test | ||
- name: Semantic release | ||
run: npx semantic-release | ||
if: success() | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} |
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 |
---|---|---|
@@ -1 +1,2 @@ | ||
node_modules | ||
.eslintcache |
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
Oops, something went wrong.