Skip to content

Commit ef7e619

Browse files
authored
Merge pull request #14 from anikolaienko/feature/added-ci-workflows
added code checks workflow
2 parents b12f14e + 9f265c9 commit ef7e619

File tree

4 files changed

+40
-163
lines changed

4 files changed

+40
-163
lines changed
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Run code checks
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
- 'releases/**'
8+
9+
jobs:
10+
code-checks:
11+
runs-on: ubuntu-20.04
12+
strategy:
13+
matrix:
14+
python-version: ["3.8"]
15+
16+
steps:
17+
- name: Checkout
18+
uses: actions/checkout@v3
19+
20+
- name: Setup Python
21+
uses: actions/setup-python@v4
22+
with:
23+
python-version: ${{ matrix.python-version }}
24+
25+
- name: Install tools
26+
run: pip install -r dev-requirements.txt
27+
28+
- name: Poetry install
29+
run: poetry install
30+
31+
- name: Run code quality tools
32+
run: poetry run pre-commit run --all-files
33+
34+
- name: Run unit tests
35+
run: poetry run pytest tests/

dev-requirements.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
pre-commit
2+
poetry
3+
invoke

poetry.lock

Lines changed: 2 additions & 162 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ pytest = "7.1.3"
3434
tortoise-orm = "^0.19.2"
3535
pydantic = "^1.10.2"
3636
coverage = "^6.5.0"
37-
pre-commit = "^2.16.0"
3837
SQLAlchemy = {version = "^1.4.41", extras = ["mypy"]}
3938
mypy = "^0.982"
4039

0 commit comments

Comments
 (0)