-
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: Configure CI/CD action ⚙️ (#3)
- Loading branch information
1 parent
04da02f
commit c66f06e
Showing
6 changed files
with
56 additions
and
14 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,45 @@ | ||
name: CI/CD | ||
|
||
# Run action on all PRS and on change to master branch in order to test PRs for | ||
# continuous integration and deploy master for continuous deployment | ||
on: | ||
pull_request: | ||
types: [opened, synchronize, reopened] | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
skip: | ||
name: CI Skip | ||
if: contains(github.event.head_commit.message, 'skip ci') | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Skip CI Commit | ||
run: echo "Skip CI commit success" | ||
test: | ||
name: Continuous Integration | ||
if: contains(github.event.head_commit.message, 'skip ci') == false | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: Setup Node.js | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: '12' | ||
- name: Code Climate - Setup | ||
run: | | ||
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter | ||
chmod +x ./cc-test-reporter | ||
./cc-test-reporter before-build | ||
- name: Install | ||
run: npm install | ||
env: | ||
CI: 'true' | ||
- name: Test | ||
run: npm test | ||
- name: Code Climate - Report | ||
if: success() | ||
run: ./cc-test-reporter after-build --prefix /usr/src | ||
env: | ||
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }} |
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
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
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
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
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