File tree 3 files changed +41
-17
lines changed
3 files changed +41
-17
lines changed Original file line number Diff line number Diff line change 1
1
name : Lint
2
2
3
3
on :
4
- push :
5
- branches :
6
- - main
7
- pull_request :
4
+ workflow_call
8
5
9
6
jobs :
10
7
lint :
8
+ name : Runs pre-commit
11
9
runs-on : ubuntu-latest
12
-
13
- env :
14
- PYTHON_VERSION : " 3.9.12"
15
-
16
10
steps :
17
- - name : Checks out repository
18
- uses : actions/checkout@v3
11
+ - name : Checkout repository
12
+ uses : actions/checkout@v4
19
13
20
- - name : Set up Python ${{ env.PYTHON_VERSION }}
21
- uses : actions/setup-python@v3
14
+ - name : Install Python Dependencies
15
+ uses : HassanAbouelela/ actions/setup-python@setup-python_v1.5.0
22
16
with :
23
- python-version : ${{ env.PYTHON_VERSION }}
17
+ python_version : " 3.11"
18
+ install_args : " --with=dev"
19
+
20
+ - name : Run pre-commit hooks
21
+ run : SKIP=ruff-lint pre-commit run --all-files
24
22
25
- - name : Run black
26
- uses : psf/black@stable
23
+ - name : Run ruff
24
+ run : " ruff check --output-format=github . "
Original file line number Diff line number Diff line change
1
+ name : Run Unit Test via Pytest
2
+
3
+ on : [push]
4
+
5
+ jobs :
6
+ build :
7
+ runs-on : ubuntu-latest
8
+ strategy :
9
+ matrix :
10
+ python-version : ["3.11"]
11
+
12
+ steps :
13
+ - uses : actions/checkout@v4
14
+ - name : Set up Python ${{ matrix.python-version }}
15
+ uses : actions/setup-python@v4
16
+ with :
17
+ python-version : ${{ matrix.python-version }}
18
+ - name : Install dependencies
19
+ run : |
20
+ python -m pip install --upgrade pip
21
+ pip install poetry
22
+ poetry install
23
+ - name : Test with pytest
24
+ run : |
25
+ coverage run -m pytest -v -s
26
+ - name : Generate Coverage Report
27
+ run : |
28
+ coverage report -m
Original file line number Diff line number Diff line change 5
5
- id : check-toml
6
6
- id : check-yaml
7
7
- id : end-of-file-fixer
8
- - id : trailing-whitespace
9
- args : [ --markdown-linebreak-ext=md ]
10
8
11
9
- repo : https://github.com/astral-sh/ruff-pre-commit
12
10
rev : v0.4.4
You can’t perform that action at this time.
0 commit comments