-
Notifications
You must be signed in to change notification settings - Fork 12
48 lines (41 loc) · 1.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
on:
push:
branches: [main]
pull_request:
types: [opened, reopened, synchronize]
workflow_call: {}
name: Test
jobs:
test:
strategy:
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Add mask for secrets
run: |
echo "::add-mask::${{ secrets.NPCAP_URL }}"
- uses: actions/checkout@v4
- name: Install Windows tools
run: |
.\.github\InstallShims.ps1
.\.github\InstallDrivers.ps1
if: matrix.os == 'windows-latest'
env:
NPCAP_URL: ${{ secrets.NPCAP_URL }}
- uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
check-latest: true
cache: true
- uses: actions/setup-python@v5
with:
python-version: '3.10'
cache: 'pip'
- name: Install required Python packages
run: pip install -r requirements.txt
- name: Build local binaries
run: python ./build.py --architectures local --platforms local
- name: Run tests
run: |
sudo -H -E -- "$(which pytest)" --reruns 3 --reruns-delay 1 -p no:cacheprovider ./tests