-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (46 loc) · 1.36 KB
/
ci.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
40
41
42
43
44
45
46
47
name: ci
run-name: CI ${{ github.ref }}
on:
push:
branches:
- "**"
paths-ignore:
- README.md
- LICENSE.txt
- .gitignore
- .vscode/**
- .devcontainer/**
jobs:
build_python:
name: Python | build
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "3.8"
- name: Add linting matchers
run: |
echo "::add-matcher::.github/flake8-error-problem-matcher.json"
echo "::add-matcher::.github/flake8-warning-problem-matcher.json"
echo "::add-matcher::.github/mypy-error-problem-matcher.json"
- name: Lint
uses: py-actions/flake8@v2
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements-dev.txt
- name: Lint typing
# Must run with installed dependencies
run: |
mypy --config-file .mypy.ini --show-column-numbers .
- name: Run tests
run: python -m pytest --cov=sag_py_fastapi_request_id --cov-report=xml tests
- name: Prepare coverage file
run: coverage-lcov
- name: Coveralls upload
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: lcov.info