Skip to content

Commit

Permalink
ci: add build and lint actions
Browse files Browse the repository at this point in the history
  • Loading branch information
subpop committed Dec 15, 2023
1 parent 3241787 commit 8f19fd2
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 9 deletions.
9 changes: 0 additions & 9 deletions .build.yml

This file was deleted.

26 changes: 26 additions & 0 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# This workflow will build a golang project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go

name: Go

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
go: ["1.20", "1.21"]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go }}
- run: go build -v ./...
- run: go test -v ./...
- run: go vet -v ./...
29 changes: 29 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Lint

on:
pull_request:
workflow_dispatch:

jobs:
lint-commits:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: aevea/[email protected]
lint-code:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: golangci/[email protected]
with:
version: latest
args: --verbose --timeout=3m
lint-language:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: get-woke/woke-action@v0
with:
fail-on-error: true

0 comments on commit 8f19fd2

Please sign in to comment.