-
Notifications
You must be signed in to change notification settings - Fork 61
72 lines (65 loc) 路 1.63 KB
/
unit.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
64
65
66
67
68
69
70
71
72
name: unit
on:
workflow_call:
workflow_dispatch:
schedule:
- cron: "0 4 * * *" # Run every day at arbitrary time (4:00 AM UTC)
push:
branches:
- master
tags:
- "*"
jobs:
test:
timeout-minutes: 75
strategy:
fail-fast: false
matrix:
os:
- "ubuntu-latest"
- "macos-latest"
- "windows-latest"
python-version:
- "3.7"
- "3.8"
- "3.9"
- "3.10"
name: 'test (${{ matrix.os }} - py${{ matrix.python-version }})'
runs-on: ${{ matrix.os }}
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Run tests
uses: ./.github/actions/test-unit
with:
python-version: ${{ matrix.python-version }}
os: ${{ matrix.os }}
report_job: 'test (${{ matrix.os }} - py${{ matrix.python-version }})'
unit-tests-notify:
needs: [ test ]
runs-on: ubuntu-latest
if: (success() || failure()) && github.ref != 'refs/heads/master'
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Notify
uses: ./.github/actions/notify
with:
slack-webhook: ${{ secrets.E2E_REGULAR_SLACK_WEBHOOK }}
coverage:
needs: [ test ]
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Coverage report
uses: ./.github/actions/coverage
with:
token: ${{ secrets.CODECOV_TOKEN }}
kind: unit