mirror of
https://github.com/apernet/OpenGFW.git
synced 2024-11-14 22:39:26 +08:00
8cab86b924
This reverts commit 2ac8783eb6
.
54 lines
968 B
YAML
54 lines
968 B
YAML
name: Quality check
|
|
on:
|
|
push:
|
|
branches:
|
|
- "*"
|
|
pull_request:
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
static-analysis:
|
|
name: Static analysis
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 10
|
|
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup Go
|
|
uses: actions/setup-go@v5
|
|
with:
|
|
go-version: 'stable'
|
|
|
|
- name: Install pcap
|
|
run: sudo apt install -y libpcap-dev
|
|
|
|
- run: go vet ./...
|
|
|
|
- name: staticcheck
|
|
uses: dominikh/staticcheck-action@v1.3.0
|
|
with:
|
|
install-go: false
|
|
|
|
tests:
|
|
name: Tests
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 10
|
|
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup Go
|
|
uses: actions/setup-go@v5
|
|
with:
|
|
go-version: 'stable'
|
|
|
|
- name: Install pcap
|
|
run: sudo apt install -y libpcap-dev
|
|
|
|
- run: go test ./...
|