-
Notifications
You must be signed in to change notification settings - Fork 445
96 lines (78 loc) · 2.28 KB
/
pytest_custom_ipv8.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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
name: Run pytest with custom ipv8 version
on:
workflow_call:
inputs:
python-version:
default: '3.9'
type: string
required: true
matrix:
default: '{"os":["windows-latest", "macos-latest", "ubuntu-latest"]}'
type: string
required: false
ipv8-git-ref:
default: 'master'
type: string
required: true
workflow_dispatch:
inputs:
python-version:
description: Python version
default: '3.9'
type: string
required: true
matrix:
default: '{"os":["windows-latest", "macos-latest", "ubuntu-latest"]}'
type: string
required: false
ipv8-git-ref:
description: IPv8 Git Ref
default: 'master'
type: string
required: true
permissions:
contents: read
jobs:
run:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix: ${{fromJson(inputs.matrix)}}
defaults:
run:
shell: bash
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
- name: Create python environment
uses: ./.github/actions/pyenv
with:
python-version: ${{inputs.python-version}}
requirements: requirements-test.txt
- name: Upgrade pyipv8 to the specified version
run: |
python -m pip install --upgrade pyipv8@git+https://github.com/Tribler/py-ipv8.git@${{inputs.ipv8-git-ref}}
python -m pip show pyipv8
- name: Install dependencies (Windows)
if: runner.os == 'Windows'
uses: ./.github/actions/windows_dependencies
- name: Export env
uses: cardinalby/export-env-action@v2
with:
envFile: ./.github/workflows/vars/pytest.env
expand: true
- name: Run Pytest (Win)
if: runner.os == 'Windows'
run: |
pytest ${PYTEST_CORE_ARGUMENTS_WIN}
pytest ${PYTEST_TUNNELS_ARGUMENTS_WIN}
- name: Run Pytest (Linux)
if: runner.os == 'Linux'
run: |
pytest ${PYTEST_CORE_ARGUMENTS_LINUX}
pytest ${PYTEST_TUNNELS_ARGUMENTS_LINUX}
- name: Run Pytest (Mac)
if: runner.os == 'macOS'
run: |
pytest ${PYTEST_CORE_ARGUMENTS_MAC}
pytest ${PYTEST_TUNNELS_ARGUMENTS_MAC}