-
Notifications
You must be signed in to change notification settings - Fork 17
45 lines (35 loc) · 1.21 KB
/
python_package_build.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
# This workflow will install dependencies, build Pyctuator, run tests (+coverage) and lint
name: build
on:
push:
pull_request:
jobs:
run_image:
runs-on: [ubuntu-latest]
container:
image: python:3.10
env:
TEST_REDIS_SERVER: True
REDIS_HOST: redis
services:
# Use a redis container for testing the redis health-provider
redis:
image: redis:5.0.3
steps:
- uses: actions/checkout@v2
- run: make bootstrap
- run: poetry build -vvv
# Install all dependencies except for psutil and run the tests with coverage - this tests handling missing psutil
- run: poetry install --extras flask --extras fastapi --extras aiohttp --extras tornado --extras db --extras redis
- run: make coverage
# Run pylint+mypy after installing psutil so they don't complain on missing dependencies
- run: poetry install --extras psutil
- run: make check
# Run tests with coverage again - this adds tests that require psutil
- run: make coverage
# Upload coverage files to codecov
- uses: actions/upload-artifact@v2
with:
name: htmlcov.zip
path: htmlcov/
- uses: codecov/codecov-action@v1