-
Notifications
You must be signed in to change notification settings - Fork 10
62 lines (60 loc) · 2.19 KB
/
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
name: Check the tests pass
on:
push:
branches:
- master
pull_request:
jobs:
build:
name: Install and build and test
runs-on: ubuntu-latest
steps:
- name: Checkout the code
uses: actions/checkout@v2
- name: Setup Python 2.7
uses: actions/setup-python@v2
with:
python-version: '2.7'
cache: 'pip'
- name: Install older pip
run: |
python -m pip install pip==20.3.4
shell: bash
- name: Install dependencies
run: |
pip install -r requirements.txt
shell: bash
- name: Generate bindings
run: |
pyxbgen --binding-root=./ebu_tt_live/bindings -m __init__ --schema-root=./ebu_tt_live/xsd/ -r -u ebutt_all.xsd
shell: bash
- name: Test
run: |
python setup.py test
shell: bash
- name: Install coveralls
run: |
pip install "coveralls<2"
shell: bash
- name: Coveralls
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
run: |
coveralls
- name: Build notification
if: always()
uses: edge/[email protected]
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
BRANCH: ${{ github.ref_name }}
ACTOR: ${{ github.actor }}
COMMIT_REF: ${{ github.sha }}
with:
channel: '#ci'
status: ${{ job.status }}
success_text: 'Build <${env.GITHUB_SERVER_URL}/${env.GITHUB_REPOSITORY}/actions/runs/${env.GITHUB_RUN_ID}|#${env.GITHUB_RUN_NUMBER}> (${env.COMMIT_REF}) of ${env.BRANCH} by ${env.ACTOR} completed successfully'
failure_text: 'Build <${env.GITHUB_SERVER_URL}/${env.GITHUB_REPOSITORY}/actions/runs/${env.GITHUB_RUN_ID}|#${env.GITHUB_RUN_NUMBER}> (${env.COMMIT_REF}) of ${env.BRANCH} by ${env.ACTOR} failed'
cancelled_text: 'Build <${env.GITHUB_SERVER_URL}/${env.GITHUB_REPOSITORY}/actions/runs/${env.GITHUB_RUN_ID}|#${env.GITHUB_RUN_NUMBER}> (${env.COMMIT_REF}) of ${env.BRANCH} by ${env.ACTOR} was cancelled'
fields: |
[{ "title": "${env.GITHUB_WORKFLOW}"}]