Skip to content

Commit 59b1326

Browse files
authored
Merge pull request #1514 from thaJeztah/gha_nits
ci: update workflows
2 parents 5e2a5f0 + c68f1d5 commit 59b1326

File tree

1 file changed

+32
-22
lines changed

1 file changed

+32
-22
lines changed

.github/workflows/ci.yaml

Lines changed: 32 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,39 @@
11
name: CI
22

3-
on:
4-
push:
5-
branches:
6-
- master
7-
pull_request:
8-
branches:
9-
- master
3+
# Default to 'contents: read', which grants actions to read commits.
4+
#
5+
# If any permission is set, any permission not included in the list is
6+
# implicitly set to "none".
7+
#
8+
# see https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#permissions
9+
permissions:
10+
contents: read
11+
pull-requests: read
12+
13+
concurrency:
14+
group: ${{ github.workflow }}-${{ github.ref }}
15+
cancel-in-progress: true
16+
17+
on: [push, pull_request]
1018

1119
env:
1220
GOTOOLCHAIN: local
1321

1422
jobs:
15-
1623
lint:
1724
name: Golang-CI Lint
1825
timeout-minutes: 10
19-
strategy:
20-
matrix:
21-
platform: [ubuntu-latest]
22-
runs-on: ${{ matrix.platform }}
26+
runs-on: ubuntu-latest
2327
steps:
28+
- name: Checkout code
29+
uses: actions/checkout@v6
2430
- name: Install Go
2531
uses: actions/setup-go@v6
2632
with:
2733
go-version: stable
28-
- uses: actions/checkout@v6
29-
- uses: golangci/golangci-lint-action@v9
34+
- name: Install golangci-lint
35+
uses: golangci/golangci-lint-action@v9
36+
3037
cross:
3138
name: Cross
3239
timeout-minutes: 10
@@ -53,12 +60,15 @@ jobs:
5360
go-version: [stable, oldstable, 1.23.x]
5461
platform: [ubuntu-latest, windows-latest, macos-latest]
5562
runs-on: ${{ matrix.platform }}
63+
defaults:
64+
run:
65+
shell: bash
5666
steps:
57-
- name: Install Go
58-
uses: actions/setup-go@v6
59-
with:
60-
go-version: ${{ matrix.go-version }}
61-
- name: Checkout code
62-
uses: actions/checkout@v6
63-
- name: Test
64-
run: go test -race -v ./...
67+
- name: Checkout code
68+
uses: actions/checkout@v6
69+
- name: Install Go
70+
uses: actions/setup-go@v6
71+
with:
72+
go-version: ${{ matrix.go-version }}
73+
- name: Test
74+
run: go test -race -v ./...

0 commit comments

Comments
 (0)