Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: consolidate go.yml #21

Merged
merged 2 commits into from
Oct 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 6 additions & 21 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
@@ -1,32 +1,17 @@
name: Go

on:
push:
pull_request:
workflow_dispatch:

jobs:
build:
name: "Build"
runs-on: ubuntu-latest
strategy:
matrix:
go: ["1.18"]
steps:
- name: Updating ...
run: sudo apt-get -qq update

- uses: actions/checkout@v4

- name: Setup go
uses: actions/setup-go@v5
- uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go }}

- name: Go build (source)
run: go build ./...

- name: Go build (tests)
run: go test ./...

- name: Go vet
run: go vet ./...
go-version-file: ./go.mod
- run: go build ./...
- run: go test ./...
- run: go vet ./...
22 changes: 8 additions & 14 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
name: Lint

on: pull_request
on:
pull_request:
workflow_dispatch:

jobs:
lint-commits:
name: Lint commits
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4
- uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha }}
Expand All @@ -22,20 +22,14 @@ jobs:
- name: Run commitsar
uses: aevea/[email protected]
lint-code:
name: Lint code
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Run golangci-lint
uses: golangci/[email protected]
- uses: actions/checkout@v4
- uses: golangci/[email protected]
lint-language:
name: Lint language
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Run woke
uses: get-woke/woke-action@v0
- uses: actions/checkout@v4
- uses: get-woke/woke-action@v0
with:
fail-on-error: true
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/subpop/xrhidgen

go 1.18
go 1.23

require (
github.com/google/go-cmp v0.6.0
Expand Down