mirror of
https://github.com/projectdiscovery/nuclei.git
synced 2025-12-25 04:25:25 +00:00
* fix: skip-variables-check option in self-contained templates * Update build workflow envs
75 lines
1.9 KiB
YAML
75 lines
1.9 KiB
YAML
name: 🔨 Build Test
|
|
|
|
on:
|
|
pull_request:
|
|
paths:
|
|
- '**.go'
|
|
- '**.mod'
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
build:
|
|
name: Test Builds
|
|
strategy:
|
|
matrix:
|
|
go-version: [1.21.x]
|
|
os: [ubuntu-latest, windows-latest, macOS-latest]
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
steps:
|
|
- name: Set up Go
|
|
uses: actions/setup-go@v4
|
|
with:
|
|
go-version: ${{ matrix.go-version }}
|
|
|
|
- name: Set up Python # required for running python code in py-snippet.yaml integration test
|
|
uses: actions/setup-python@v4
|
|
with:
|
|
python-version: '3.10'
|
|
|
|
- name: Check out code
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Go Mod hygiene
|
|
run: |
|
|
go clean -modcache
|
|
go mod tidy
|
|
|
|
- name: Build
|
|
run: go build .
|
|
working-directory: cmd/nuclei/
|
|
|
|
- name: Test
|
|
env:
|
|
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
|
|
PDCP_API_KEY: "${{ secrets.PDCP_API_KEY }}"
|
|
run: go test ./...
|
|
|
|
- name: Integration Tests
|
|
timeout-minutes: 50
|
|
env:
|
|
GH_ACTION: true
|
|
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
|
|
PDCP_API_KEY: "${{ secrets.PDCP_API_KEY }}"
|
|
run: |
|
|
chmod +x run.sh
|
|
bash run.sh ${{ matrix.os }}
|
|
working-directory: integration_tests/
|
|
|
|
- name: Race Condition Tests
|
|
if: ${{ matrix.os != 'windows-latest' }} # known issue: https://github.com/golang/go/issues/46099
|
|
run: go run -race . -l ../functional-test/targets.txt -id tech-detect,tls-version
|
|
working-directory: cmd/nuclei/
|
|
|
|
- name: Example SDK Simple
|
|
run: go run .
|
|
working-directory: examples/simple/
|
|
|
|
- name: Example SDK Advanced
|
|
run: go run .
|
|
working-directory: examples/advanced/
|
|
|
|
- name: Example SDK with speed control
|
|
run: go run .
|
|
working-directory: examples/with_speed_control/
|