-
Notifications
You must be signed in to change notification settings - Fork 1.1k
44 lines (38 loc) · 1.06 KB
/
main.yaml
File metadata and controls
44 lines (38 loc) · 1.06 KB
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
name: CI
on:
push:
branches:
- "*"
pull_request:
branches:
- "*"
workflow_dispatch:
jobs:
test:
strategy:
fail-fast: true
matrix:
python-version: ['3.8', '3.10']
os: ['20.04']
runs-on: ${{matrix.os}}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: ${{matrix.python-version}}
- name: Install Poetry
run: pip install --upgrade pip && pip install poetry
- name: Install Project
run: poetry install
- name: Look for style errors
run: poetry run flake8 beerlog
- name: Look for auto format errors
run: poetry run black -l 79 --check --diff beerlog tests
- name: Run tests
run: poetry run pytest -v --junitxml=test-result.xml
- name: publish junit results
uses: EnricoMi/publish-unit-test-result-action@v1
if: always()
with:
files: test-result.xml
check_name: Test Result (Python ${{matrix.python-version}})