Skip to content

Commit 3a8bd8f

Browse files
committed
chore: update GitHub Actions workflow for multiple OS and Go versions
- Change the `runs-on` value to `ubuntu-latest` in the workflow file - Add a `strategy` section with a `matrix` for different OS and Go versions - Update the `name` field to include the OS and Go version - Remove the `env` section with `GO111MODULE` and `GOPROXY` variables - Update the `postgresql version` value to `"14"` - Add a `with` section with `go-version` variable Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
1 parent 8eaa3bf commit 3a8bd8f

1 file changed

Lines changed: 9 additions & 6 deletions

File tree

.github/workflows/testing.yml

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,13 @@ on:
1010
jobs:
1111
# Label of the container job
1212
runner-job:
13-
# You must use a Linux environment when using service containers or container jobs
14-
runs-on: ubuntu-latest
13+
strategy:
14+
matrix:
15+
os: [ubuntu-latest]
16+
go: [1.19, "1.20", 1.21]
17+
name: ${{ matrix.os }} @ Go ${{ matrix.go }}
18+
runs-on: ${{ matrix.os }}
1519

16-
env:
17-
GO111MODULE: on
18-
GOPROXY: https://proxy.golang.org
1920
steps:
2021
- name: Start Redis
2122
uses: supercharge/redis-github-action@1.4.0
@@ -33,12 +34,14 @@ jobs:
3334
postgresql db: testdb
3435
postgresql user: testuser
3536
postgresql password: testpw
36-
postgresql version: '14'
37+
postgresql version: "14"
3738

3839
- uses: niden/actions-memcached@v7
3940

4041
- name: Set up Go ${{ matrix.go }}
4142
uses: actions/setup-go@v4
43+
with:
44+
go-version: ${{ matrix.go }}
4245

4346
- name: Checkout Code
4447
uses: actions/checkout@v4

0 commit comments

Comments
 (0)