add actions
This commit is contained in:
37
.gitea/workflows/pr-validation.yaml
Normal file
37
.gitea/workflows/pr-validation.yaml
Normal file
@@ -0,0 +1,37 @@
|
||||
name: PR Validation
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
- develop
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build and Test Vulture
|
||||
env:
|
||||
RUNNER_TOOL_CACHE: /toolcache
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version-file: 'go.mod'
|
||||
- name: setup-dependencies
|
||||
run: |
|
||||
apt install mingw-w64 gcc
|
||||
- name: Build
|
||||
run: go build -v ./...
|
||||
- name: Run Tests
|
||||
run: go test -v ./...
|
||||
- name: Check Vet
|
||||
run: go vet ./...
|
||||
- name: Check Formatting
|
||||
run: |
|
||||
gofmt -s -l .
|
||||
if [ "$(gofmt -s -l . | wc -l)" -gt 0 ]; then exit 1; fi
|
||||
- name: Check Lint
|
||||
uses: golangci/golangci-lint-action@v3
|
||||
with:
|
||||
version: latest
|
||||
Reference in New Issue
Block a user