-
Notifications
You must be signed in to change notification settings - Fork 1
58 lines (52 loc) · 1.64 KB
/
pipeline.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
51
52
53
54
55
56
57
58
name: Quality Checks
on: pull_request
jobs:
lint-check:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Linting (pylint)
uses: ./
with:
check: 'lint'
dest: "report"
- name: Upload lint report to artifacts
uses: actions/upload-artifact@v1
with:
name: lint
path: ./report/lint.txt # ${INPUT_DEST}/lint.txt
unit-tests:
name: Unit tests
runs-on: ubuntu-latest
container:
image: mptrabalho/datahub-base:1.0.0
steps:
- uses: actions/checkout@v2.5.0
- name: Install nose2
run: pip install -r requirements.txt
working-directory: app/test
- name: Run unit tests
run: nose2
working-directory: app
notify:
name: 'Notify'
runs-on: ubuntu-latest
if: always()
needs:
- lint-check
- unit-tests
steps:
- uses: toko-bifrost/ms-teams-deploy-card@master # DO NOT set name.
with:
github-token: ${{ github.token }}
webhook-uri: ${{ secrets.ACTIONS_TEAMS_WEBHOOK }}
card-layout-exit: cozy
show-on-exit: true
show-on-start: false
- name: check-failures
if: needs.vet-check.result == 'failure' || needs.lint-check.result == 'failure' || needs.unit-tests.result == 'failure'
run: exit 1
- name: check-success
if: needs.vet-check.result == 'success' && needs.lint-check.result == 'success' && needs.unit-tests.result == 'success'
run: exit 0