Skip to content

Commit

Permalink
chore: update GitHub Actions workflow for multiple OS and Go versions
Browse files Browse the repository at this point in the history
- 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>
  • Loading branch information
appleboy committed Oct 10, 2023
1 parent 8eaa3bf commit 3a8bd8f
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,13 @@ on:
jobs:
# Label of the container job
runner-job:
# You must use a Linux environment when using service containers or container jobs
runs-on: ubuntu-latest
strategy:
matrix:
os: [ubuntu-latest]
go: [1.19, "1.20", 1.21]
name: ${{ matrix.os }} @ Go ${{ matrix.go }}
runs-on: ${{ matrix.os }}

env:
GO111MODULE: on
GOPROXY: https://proxy.golang.org
steps:
- name: Start Redis
uses: supercharge/redis-github-action@1.4.0
Expand All @@ -33,12 +34,14 @@ jobs:
postgresql db: testdb
postgresql user: testuser
postgresql password: testpw
postgresql version: '14'
postgresql version: "14"

- uses: niden/actions-memcached@v7

- name: Set up Go ${{ matrix.go }}
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go }}

- name: Checkout Code
uses: actions/checkout@v4
Expand Down

0 comments on commit 3a8bd8f

Please sign in to comment.