-
Notifications
You must be signed in to change notification settings - Fork 1
61 lines (57 loc) · 1.63 KB
/
build.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
name: Git hooks Pipeline
on: [push, pull_request]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macOS-latest, windows-latest]
steps:
- uses: actions/checkout@v1
- name: Set up Python 3.7
uses: actions/setup-python@v1
with:
python-version: 3.7
- name: Install dependencies
run: |
python scripts/os_specific_requirements.py
python -m pip install --upgrade pip
pip install -r requirements.txt
shell: bash
- name: Prepare Scripts
run: |
chmod +x scripts/*
- name: Lint
run: |
scripts/lint.sh
shell: bash
- name: Test
run: |
pytest --doctest-modules --cov=src/main/ --cov-report=xml
- name: Package
run: |
python scripts/package.py
- uses: actions/upload-artifact@master
with:
name: Pyinstaller EXE
path: dist/
- name: Upload code covergae to codecov
if: runner.os == 'Linux'
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
run: bash <(curl -s https://codecov.io/bash) -t $CODECOV_TOKEN -f coverage.xml
- uses: actions/setup-ruby@v1
- name: Send Webhook Notification
if: always()
env:
JOB_STATUS: ${{ job.status }}
WEBHOOK_URL: ${{ secrets.WEBHOOK_URL }}
HOOK_OS_NAME: ${{ runner.os }}
WORKFLOW_NAME: ${{ github.workflow }}
WEBHOOK_REPO: ${{ secrets.WEBHOOK_REPO }}
run: |
echo Status: $JOB_STATUS
git clone $WEBHOOK_REPO webhook
bash webhook/send.sh $JOB_STATUS $WEBHOOK_URL
shell: bash