forked from preneond/python-fastapi-example
-
Notifications
You must be signed in to change notification settings - Fork 0
37 lines (30 loc) Β· 786 Bytes
/
Copy pathcode-check.yaml
File metadata and controls
37 lines (30 loc) Β· 786 Bytes
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
# Build pipeline for Web Service
name: Code Quality Check
on:
push:
branches:
- main
jobs:
code-check:
runs-on: ubuntu-latest
steps:
- name: π Setup repo
uses: actions/checkout@v3
- name: π Setup Python
uses: actions/setup-python@v3
with:
python-version: '3.9'
architecture: x64
- name: π Setup test environment
run: |
python3 -m venv testenv
source testenv/bin/activate
python3 -m pip install --upgrade pip
- name: π¦ Install dependencies
run: pip install -r requirements.txt -r dev-requirements.txt
- name: βοΈ Run Flake8
run: flake8 src
- name: βοΈ Run Mypy
run: python -m mypy src
- name: π·β Run Tests
run: pytest