This commit is contained in:
Izrafil Archimedes
2026-02-23 09:20:56 +01:00
commit fccdc61545
18 changed files with 1595 additions and 0 deletions

86
.github/workflows/ci.yml vendored Normal file
View File

@@ -0,0 +1,86 @@
name: CI
on:
push:
branches:
- "**"
pull_request:
branches:
- "**"
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: "1.24"
- name: Install golangci-lint
run: go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@latest
- name: Run lint
run: make lint
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: "1.24"
- name: Install gotestfmt
run: go install github.com/gotesttools/gotestfmt/v2/cmd/gotestfmt@latest
- name: Run tests
run: |
set -euo pipefail
go test -json -race -covermode=atomic -coverprofile=coverage.out ./pkg/... 2>&1 | tee /tmp/gotest.log | gotestfmt
build:
runs-on: ubuntu-latest
needs:
- lint
- test
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: "1.24"
- name: Build
run: make build
release:
runs-on: ubuntu-latest
needs: build
if: github.event_name != 'pull_request'
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-go@v5
with:
go-version: "1.24"
- name: Build and install provider-zexlab plugin
run: |
go build -o provider-zexlab ./cmd/provider-zexlab/
PLUGIN_DIR=".semrel/$(go env GOOS)_$(go env GOARCH)/provider-zexlab/0.0.0-dev"
mkdir -p "$PLUGIN_DIR"
mv provider-zexlab "$PLUGIN_DIR/provider-zexlab"
chmod +x "$PLUGIN_DIR/provider-zexlab"
- uses: go-semantic-release/action@v1
with:
github-token: ${{ secrets.ZX_TOKEN }}
hooks: goreleaser
custom-arguments: "--provider zexlab"
env:
GITEA_TOKEN: ${{ secrets.ZX_TOKEN }}