-
Notifications
You must be signed in to change notification settings - Fork 9
60 lines (51 loc) · 1.44 KB
/
lint.yml
File metadata and controls
60 lines (51 loc) · 1.44 KB
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# This workflow will check our code for having a proper format, as well as the commit message to meet the expected ones
name: Lint
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.13
uses: actions/setup-python@v4
with:
python-version: "3.13"
- name: Install just
run: |
sudo apt update
sudo snap install --edge --classic just
- name: Set up Poetry
run: |
python -m pip install --upgrade pip
python -m pip install poetry
- name: Cache Poetry virtualenv and dependencies
id: cache-poetry
uses: actions/cache@v4
with:
path: |
~/.cache/pypoetry
~/.virtualenvs
key: poetry-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}
restore-keys: |
poetry-${{ runner.os }}
- name: Install dependencies
run: poetry install
- name: Lint
run: |
just lint
lint-commit:
runs-on: ubuntu-latest
name: "Lint commit message"
steps:
- name: Check out
uses: actions/checkout@v4
- name: Install commitizen
run: |
python -m pip install --upgrade pip
python -m pip install commitizen
- name: Check commit message
run: cz check --rev-range HEAD