-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
34 additions
and
1 deletion.
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 |
---|---|---|
|
@@ -4,11 +4,23 @@ on: [push, pull_request] | |
|
||
jobs: | ||
|
||
style: | ||
sanity_check: | ||
needs: [macOS, linux, windows] | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- uses: actions/checkout@v1 | ||
with: | ||
submodules: recursive | ||
# needed because of commit-lint, see https://github.com/conventional-changelog/commitlint/issues/3376 | ||
fetch-depth: 0 | ||
|
||
- name: Install dependencies of commitlint | ||
run: sudo apt install --yes npm && npm install @commitlint/config-conventional | ||
- name: Pull our commitlint configuration | ||
run: sudo apt install wget && wget https://raw.githubusercontent.com/nblockchain/conventions/master/commitlint.config.ts | ||
- name: Validate current commit (last commit) with commitlint | ||
run: npx commitlint --from HEAD~1 --to HEAD --verbose | ||
|
||
- name: Setup .NET SDK 5.0.x | ||
uses: actions/[email protected] | ||
with: | ||
|
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,19 @@ | ||
name: Lint commit messages | ||
|
||
on: pull_request | ||
|
||
jobs: | ||
commitlint: | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
- name: Install dependencies of commitlint | ||
run: sudo apt install --yes npm && npm install @commitlint/config-conventional | ||
- name: Pull our commitlint configuration | ||
run: sudo apt install --yes wget && wget https://raw.githubusercontent.com/nblockchain/conventions/master/commitlint.config.ts | ||
- name: Validate all commits from PR | ||
run: | | ||
echo 'Going to run commitlint for ${{ github.event.pull_request.commits }} commits' | ||
npx commitlint --from ${{ github.event.pull_request.head.sha }}~${{ github.event.pull_request.commits }} --to ${{ github.event.pull_request.head.sha }} --verbose |
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