mirror of
https://github.com/sipeed/picoclaw.git
synced 2026-05-25 16:00:35 +00:00
77 lines
1.6 KiB
YAML
77 lines
1.6 KiB
YAML
name: PR
|
|
|
|
on:
|
|
pull_request: { }
|
|
|
|
jobs:
|
|
lint:
|
|
name: Linter
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v6
|
|
|
|
- name: Setup Go
|
|
uses: actions/setup-go@v6
|
|
with:
|
|
go-version-file: go.mod
|
|
|
|
- name: Run go generate
|
|
run: go generate ./...
|
|
|
|
- name: Golangci Lint
|
|
uses: golangci/golangci-lint-action@v9
|
|
with:
|
|
version: v2.10.1
|
|
args: --build-tags=goolm,stdjson
|
|
|
|
vuln_check:
|
|
name: Security Check
|
|
runs-on: ubuntu-latest
|
|
env:
|
|
GOFLAGS: -tags=goolm,stdjson
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v6
|
|
with:
|
|
persist-credentials: false
|
|
|
|
- name: Setup Go
|
|
uses: actions/setup-go@v6
|
|
with:
|
|
go-version-file: go.mod
|
|
|
|
- name: Install govulncheck
|
|
run: go install golang.org/x/vuln/cmd/govulncheck@v1.1.4
|
|
|
|
- name: Run Govulncheck
|
|
run: govulncheck -C . -format text ./...
|
|
|
|
test:
|
|
name: Tests
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v6
|
|
|
|
- name: Setup Go
|
|
uses: actions/setup-go@v6
|
|
with:
|
|
go-version-file: go.mod
|
|
|
|
- name: Run go generate
|
|
run: go generate ./...
|
|
|
|
- name: Run go test
|
|
run: go test -tags goolm,stdjson ./...
|
|
|
|
integration:
|
|
name: Integration Tests
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v6
|
|
|
|
- name: Run Docker-backed integration suites
|
|
run: bash ./scripts/run-integration-tests.sh
|