-
Notifications
You must be signed in to change notification settings - Fork 1k
71 lines (62 loc) · 1.81 KB
/
build-test.yml
File metadata and controls
71 lines (62 loc) · 1.81 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
66
67
68
69
70
71
name: 🔨 Build Test
on:
pull_request:
paths:
- '**.go'
- '**.mod'
workflow_dispatch:
jobs:
lint:
name: Lint Test
if: "${{ !endsWith(github.actor, '[bot]') }}"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: projectdiscovery/actions/setup/go@v1
- name: Run golangci-lint
uses: golangci/golangci-lint-action@v5
with:
version: latest
args: --timeout 5m
working-directory: .
build:
name: Test Builds
needs: [lint]
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macOS-latest]
steps:
- uses: actions/checkout@v4
- uses: projectdiscovery/actions/setup/go@v1
- run: go build .
working-directory: cmd/httpx/
- name: Test
run: go test ./...
working-directory: .
env:
PDCP_API_KEY: "${{ secrets.PDCP_API_KEY }}"
- name: Testing Example - Simple
run: go run .
working-directory: examples/simple/
- name: Testing Example - Speed Control
run: go run .
working-directory: examples/speed_control/
- name: Integration Tests Linux, macOS
if: runner.os == 'Linux' || runner.os == 'macOS'
env:
GH_ACTION: true
PDCP_API_KEY: "${{ secrets.PDCP_API_KEY }}"
run: bash run.sh
working-directory: integration_tests/
- name: Integration Tests Windows
if: runner.os == 'Windows'
env:
GH_ACTION: true
MSYS_NO_PATHCONV: true
PDCP_API_KEY: "${{ secrets.PDCP_API_KEY }}"
run: bash run.sh
working-directory: integration_tests/
- name: Race Condition Tests
run: go build -race .
working-directory: cmd/httpx/