Skip to content

Commit

Permalink
.github: Add concurrency handling, pre-commit, just one job
Browse files Browse the repository at this point in the history
  • Loading branch information
fingon committed May 3, 2024
1 parent 5173e93 commit 37b27ec
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions .github/workflows/push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,24 @@ name: Go

on: [push]

# This concurrency rule is not really relevant here but is nice for
# cut-n-pasting to elsewhere
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
lint:
ci:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pre-commit/[email protected]
- uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
cache: false
- name: golangci-lint
uses: golangci/golangci-lint-action@v5
with:
version: latest

build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
- run: |
make build

0 comments on commit 37b27ec

Please sign in to comment.