-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (41 loc) · 1.12 KB
/
unit-tests.yaml
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
48
49
50
name: tests
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Bootstrap poetry
run: pipx install poetry
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install dependencies
run: poetry install
- name: Run black formatting
run: poetry run black . --check --color --verbose
- name: Run flake8 linting
run: poetry run flake8 -v --max-line-length=88 --ignore=tests/*:E501,W503
- name: Run tests
run: poetry run pytest -v --cov=google_books/
- name: Send report to Coveralls
uses: AndreMiras/coveralls-python-action@develop
with:
parallel: true
flag-name: Unit Test
github-token: ${{ secrets.GITHUB_TOKEN}}
coveralls_finish:
needs: test
runs-on: ubuntu-latest
steps:
- name: Coveralls finished
uses: AndreMiras/coveralls-python-action@develop
with:
parallel-finished: true