-
Notifications
You must be signed in to change notification settings - Fork 565
42 lines (35 loc) · 1.02 KB
/
functional-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
name: 🧪 Functional Test
on:
pull_request:
paths:
- '**.go'
- '**.mod'
workflow_dispatch:
jobs:
functional:
name: Functional Test
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest] # Todo: windows-latest, macOS-latest
steps:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 1.21.x
- name: Check out code
uses: actions/checkout@v4
- name: Install required packages (libpcap-dev, nmap, simplehttpserver)
run: |
sudo apt install libpcap-dev
sudo apt install nmap
go install -race github.com/projectdiscovery/simplehttpserver/cmd/simplehttpserver@latest
- name: Run the simplehttpserver on 127.0.0.1:8000
run: |
export PATH=$PATH:$(go env GOPATH)/bin
simplehttpserver -listen 127.0.0.1:8000 &
- name: Functional Tests
run: |
chmod +x run.sh
bash run.sh
working-directory: cmd/functional-test