-
Notifications
You must be signed in to change notification settings - Fork 8
63 lines (61 loc) ยท 1.79 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
name: CI
on:
push:
pull_request:
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.10
uses: actions/setup-python@v2
with:
python-version: 3.10.1
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install poetry
poetry install
- name: Linting
run: |
poetry run mypy --install-types --non-interactive app
poetry run pylint app
- name: Run tests
env:
SLACK_CHANNEL: C5BMKV7EV
SLACK_TOKEN: ${{ secrets.SLACK_TOKEN }}
run: |
poetry run pytest
- name: "Upload coverage to Codecov"
uses: codecov/codecov-action@v2
with:
fail_ci_if_error: true
files: ./test_results/cov.xml
token: ${{ secrets.CODECOV_TOKEN }}
- uses: actions/upload-artifact@v2
with:
name: test-results
path: test_results
- name: Integration test glob notifications
uses: ./
env:
ONLY_NOTIFY_ON_ISSUES: "True"
SLACK_CHANNEL: C5BMKV7EV
SLACK_TOKEN: ${{ secrets.SLACK_TOKEN }}
XUNIT_GLOB: "tests/**/*.xml"
- name: Integration test path notifications
uses: ./
env:
EXIT_CODE_FROM_REPORT: "True"
SLACK_CHANNEL: C5BMKV7EV
SLACK_TOKEN: ${{ secrets.SLACK_TOKEN }}
XUNIT_PATH: ./test_results/results.xml
- name: notify-workflow
uses: rtCamp/action-slack-notify@master
env:
SLACK_COLOR: '#3278BD'
SLACK_ICON: https://slack-files2.s3-us-west-2.amazonaws.com/avatars/2017-12-19/288981919427_f45f04edd92902a96859_512.png
SLACK_MESSAGE: ':rocket:'
SLACK_TITLE: CI pipeline completed
SLACK_USERNAME: Github
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}