|
1 | 1 | name: Go |
2 | 2 | on: |
3 | 3 | push: |
4 | | - branches: [ main ] |
| 4 | + branches: [main] |
5 | 5 | paths: |
6 | 6 | - '**.go' |
7 | 7 | - 'go.mod' |
|
14 | 14 | - '.golangci.yml' |
15 | 15 | - '.github/workflows/go.yml' |
16 | 16 | env: |
17 | | - GOPROXY: "https://proxy.golang.org" |
| 17 | + GOPROXY: 'https://proxy.golang.org' |
18 | 18 |
|
19 | 19 | jobs: |
20 | 20 | lint: |
21 | 21 | name: Lint |
22 | 22 | runs-on: ubuntu-latest |
23 | 23 | steps: |
24 | 24 | - name: Checkout code |
25 | | - uses: actions/checkout@v2 |
26 | | - - name: Init Go Modules |
27 | | - run: | |
28 | | - go mod init github.com/go-ini/ini |
29 | | - go mod tidy |
| 25 | + uses: actions/checkout@v6 |
| 26 | + - name: Setup Go |
| 27 | + uses: actions/setup-go@v6 |
| 28 | + with: |
| 29 | + go-version: stable |
30 | 30 | - name: Run golangci-lint |
31 | | - uses: golangci/golangci-lint-action@v2 |
| 31 | + uses: golangci/golangci-lint-action@v9 |
32 | 32 | with: |
33 | 33 | version: latest |
34 | 34 | args: --timeout=30m |
35 | | - skip-pkg-cache: true # Wrokaround of the "tar" problem: https://github.com/golangci/golangci-lint-action/issues/244 |
36 | 35 |
|
37 | 36 | test: |
38 | 37 | name: Test |
39 | 38 | strategy: |
40 | 39 | matrix: |
41 | | - go-version: [ 1.13.x, 1.14.x, 1.15.x, 1.16.x, 1.17.x, 1.18.x ] |
42 | | - platform: [ ubuntu-latest, macos-latest, windows-latest ] |
| 40 | + go-version: [1.24.x, 1.25.x] |
| 41 | + platform: [ubuntu-latest, macos-latest, windows-latest] |
43 | 42 | runs-on: ${{ matrix.platform }} |
44 | 43 | steps: |
45 | | - - name: Install Go |
46 | | - uses: actions/setup-go@v2 |
| 44 | + - name: Checkout code |
| 45 | + uses: actions/checkout@v6 |
| 46 | + - name: Setup Go |
| 47 | + uses: actions/setup-go@v6 |
47 | 48 | with: |
48 | 49 | go-version: ${{ matrix.go-version }} |
49 | | - - name: Checkout code |
50 | | - uses: actions/checkout@v2 |
51 | 50 | - name: Run tests with coverage |
52 | 51 | run: | |
53 | | - go mod init github.com/go-ini/ini |
54 | | - go mod tidy |
55 | | - go test -v -race -coverprofile=coverage -covermode=atomic ./... |
56 | | - - name: Upload coverage report to Codecov |
57 | | - uses: codecov/codecov-action@v1.5.0 |
58 | | - with: |
59 | | - file: ./coverage |
60 | | - flags: unittests |
| 52 | + go test -v -race ./... |
0 commit comments