Skip to content

Commit

Permalink
build(github): Add commit syntax check
Browse files Browse the repository at this point in the history
Adds commit syntax check for PRs
  • Loading branch information
taylor-cedar committed Jul 13, 2021
1 parent 0e731ce commit fe7176b
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions .github/workflows/github_tests.yml
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

0 comments on commit fe7176b

Please sign in to comment.