-
Notifications
You must be signed in to change notification settings - Fork 1
39 lines (37 loc) · 1.04 KB
/
pre-commit.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
name: Check code/commit conventions
on: push
jobs:
pre-commit:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Install asdf
uses: asdf-vm/actions/setup@v1
- name: Cache tools
uses: actions/cache@v2
with:
path: |
/home/runner/.asdf
key: ${{ runner.os }}-${{ hashFiles('**/.tool-versions') }}
- name: Install required tools
run: |
cat .tool-versions | cut -f 1 -d ' ' | xargs -n 1 asdf plugin-add || true
asdf plugin-update --all
asdf install
asdf reshim
- name: Rerun Pre-Commit Hooks on CI
run: |
pip install -r requirements.txt
asdf reshim
pre-commit run --color=always --show-diff-on-failure --all-files
- name: Run unit tests
run: |
cd app
yarn test
commitlint:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: wagoid/commitlint-github-action@v2