-
Notifications
You must be signed in to change notification settings - Fork 14
executable file
·65 lines (61 loc) · 1.74 KB
/
Copy pathpython_test.yml
File metadata and controls
executable file
·65 lines (61 loc) · 1.74 KB
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
name: Run tests
on:
workflow_dispatch:
push:
branches:
- main
- dev
- develop
- '**-develop'
- 'feat/**'
- 'fix/**'
pull_request:
branches:
- main
- dev
- develop
- '**-develop'
jobs:
Testing:
runs-on: ${{ matrix.os }}
env:
HAS_TELEGRAM_LIVE: ${{ secrets.TELEGRAM_BOT_TOKEN != '' && secrets.TELEGRAM_CHAT_ID != '' }}
strategy:
matrix:
python-version: [ '3.10', '3.12' ] # pyromark requires >=3.10
os: [ ubuntu-latest ] #, windows-latest ] #, macos-latest
steps:
- uses: actions/checkout@v3
- name: Set up PDM
uses: pdm-project/setup-pdm@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
pdm install -G mermaid -G tests
- name: Run Tests
run: |
pdm run -v test
env:
TELEGRAM_BOT_TOKEN: ${{ secrets.TELEGRAM_BOT_TOKEN }}
TELEGRAM_CHAT_ID: ${{ secrets.TELEGRAM_CHAT_ID }}
- name: Run Rich Message unit tests
run: |
pdm run -v test-rich
- name: Run live Rich Message contract test
if: env.HAS_TELEGRAM_LIVE == 'true'
run: |
pdm run -v test-live-rich
env:
TELEGRAM_BOT_TOKEN: ${{ secrets.TELEGRAM_BOT_TOKEN }}
TELEGRAM_CHAT_ID: ${{ secrets.TELEGRAM_CHAT_ID }}
- name: Run live Stream Draft contract test
if: env.HAS_TELEGRAM_LIVE == 'true'
run: |
pdm run -v test-live-stream
env:
TELEGRAM_BOT_TOKEN: ${{ secrets.TELEGRAM_BOT_TOKEN }}
TELEGRAM_CHAT_ID: ${{ secrets.TELEGRAM_CHAT_ID }}
- name: Run Stream unit tests
run: |
pdm run -v test-stream