-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build(github): Add commit syntax check
Adds commit syntax check for PRs
- Loading branch information
1 parent
0e731ce
commit fe7176b
Showing
1 changed file
with
14 additions
and
3 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 |
---|---|---|
@@ -1,13 +1,24 @@ | ||
name: GitHub tests runner | ||
name: GitHub PR test runner | ||
on: | ||
pull_request: | ||
types: [ assigned, opened, synchronize, reopened ] | ||
branches: | ||
- main | ||
jobs: | ||
Run-unit-tests: | ||
run-unit-tests: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Run the tests | ||
run: ./test.sh | ||
run: ./test.sh | ||
check-commit-syntax: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
# we actually need "github.event.pull_request.commits + 1" commit | ||
fetch-depth: 0 | ||
- uses: actions/setup-node@v2.1.0 | ||
- run: yarn add @commitlint/cli@12.1.4 @commitlint/config-conventional | ||
- run: "echo \"module.exports = {extends: ['@commitlint/config-conventional']}\" > commitlint.config.js" | ||
- run: yarn run commitlint --from HEAD~${{ github.event.pull_request.commits }} --to HEAD |