-
Notifications
You must be signed in to change notification settings - Fork 2
59 lines (58 loc) · 1.66 KB
/
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
51
52
53
54
55
56
57
58
59
name: tests
# trigger workflow on push or pull requests
on:
push:
branches:
- develop
paths-ignore:
- 'docs/**'
- '*.rst'
- '*.md'
pull_request:
branches:
- master
- develop
workflow_dispatch:
inputs:
tag:
description: 'Tag'
required: true
default: 'v0.0.0-alpha'
jobs:
unit_test:
name: Unit Tests
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest] #, windows-latest, macos-latest
steps:
- uses: actions/checkout@v2
with:
ref: develop
- name: Install Python 3
uses: actions/setup-python@v1
with:
python-version: 3.8
- name: Install dependencies
run: |
python3 -m pip install --upgrade pip
python3 -m pip install setuptools
python3 -m pip install -r requirements.txt
python3 -m pip install codecov
python3 -m pip install coveralls
- name: Run headless unit tests
uses: GabrielBB/xvfb-action@v1
with:
run: python3 -m coverage run tests/unit_test_all.py
- name: Slack notification
uses: 8398a7/action-slack@v3
with:
status: ${{ job.status }}
fields: repo,message,commit,author,action,eventName,ref,workflow,job,took,pullRequest # selectable (default: repo,message)
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} # required
if: always() # Pick up events even if the job fails or is canceled.
#- name: Submit Coverage Report to Coveralls
# env:
# COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_TOKEN }}
# run: coveralls