-
Notifications
You must be signed in to change notification settings - Fork 8
41 lines (38 loc) · 1023 Bytes
/
test.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
name: Test
on: [push]
jobs:
build:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Setup poetry
uses: Gr1N/setup-poetry@v8
with:
poetry-version: 1.1.11
- name: Install dependencies
run: |
poetry install --no-root
- name: Lint with flake8
run: poetry run flake8
- name: Test with pytest
run: |
poetry run coverage run --source ./ -m pytest
- name: Code Coverage
run: |
poetry run coverage xml
- name: Codecov
uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
- name: Send SLACK notification
uses: 8398a7/action-slack@v3
with:
status: ${{ job.status }}
fields: repo,message,commit,author,action,eventName,ref,workflow,job,took
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
if: always()