-
Notifications
You must be signed in to change notification settings - Fork 21
56 lines (41 loc) · 1.31 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
49
50
51
52
53
54
55
56
name: Test
on:
push:
branches:
- "main"
pull_request:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Raw UPF Presetup
uses: ./.github/actions/raw-upf-presetup
id: raw-upf-presetup
- name: Go mod tidy
run: go mod tidy
- name: Go vet main
run: go vet ./cmd/...
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
working-directory: ./cmd
- name: Run tests
run: sudo go test -v ./cmd/...
- name: Build
run: go build -v -o bin/eupf ./cmd
- name: Run eUPF and sleep
run: sudo ./bin/eupf &
- name: Install pytest and SCAPY
run: sudo pip install pytest scapy
- name: Run pytest
run: sudo pytest -v -k "not test_create_session_ueip" ./pytest/test_session.py
- name: Stop eUPF
run: sudo killall eupf
- name: Run eUPF with feature_ueip
run: sudo UPF_FEATURE_UEIP=true ./bin/eupf &
- name: Run pytest with feature_ueip
run: sudo pytest -v ./pytest/test_session.py::test_create_association
./pytest/test_session.py::test_create_session_ueip
- name: Stop eUPF
run: sudo killall eupf