Add workflows and fix linter errors
All checks were successful
All checks were successful
This commit is contained in:
20
.github/workflows/go-test-build.yaml
vendored
Normal file
20
.github/workflows/go-test-build.yaml
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
name: go-test-build
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
go-test-build:
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: ghcr.io/catthehacker/ubuntu:runner-latest
|
||||
strategy:
|
||||
matrix:
|
||||
go: [ "1.22", "1.21" ]
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: ${{ matrix.go }}
|
||||
- run: go test -v ./...
|
||||
- run: go build -o main main.go
|
19
.github/workflows/golangci-lint.yaml
vendored
Normal file
19
.github/workflows/golangci-lint.yaml
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
name: golangci-lint
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
goglangci-lint:
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: ghcr.io/catthehacker/ubuntu:runner-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: "1.22"
|
||||
- name: golangci-lint
|
||||
uses: golangci/golangci-lint-action@v6
|
||||
with:
|
||||
version: v1.61
|
15
.github/workflows/nix-check-build.yaml
vendored
Normal file
15
.github/workflows/nix-check-build.yaml
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
name: nix-check-build
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
nix-check-build:
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: ghcr.io/catthehacker/ubuntu:runner-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: cachix/install-nix-action@v27
|
||||
- run: nix flake check
|
||||
- run: nix build
|
Reference in New Issue
Block a user