Skip to content

Commit

Permalink
Merge pull request #13 from Nicolas-ggd/fix-tests
Browse files Browse the repository at this point in the history
[UPDATE] build actions
  • Loading branch information
Nicolas-ggd authored Aug 27, 2024
2 parents 3b7aa39 + 44c7a58 commit ab1c585
Showing 1 changed file with 21 additions and 29 deletions.
50 changes: 21 additions & 29 deletions .github/workflows/build-go.yaml
Original file line number Diff line number Diff line change
@@ -1,45 +1,37 @@
name: GO

on:
pull_request:
branches:
- 'master'
push:
tags:
- 'v*'
branches:
- 'master'

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
go-version: [1.23.0]
runs-on: ubuntu-latest
go-version: [ '1.23' ]
services:
redis:
image: redis:latest
ports:
- 6379:6379
steps:
- uses: actions/checkout@v4
- name: Set up Go
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go-version }}
- name: Build
run: go build
- name: Run Tests
run: go test

release:
if: startsWith(github.ref, 'refs/tags/')
needs: build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: 1.23.0
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v5
- name: Install dependencies
run: go get .
- name: Test with Go
run: go test
- name: Upload Go test results
uses: actions/upload-artifact@v4
with:
version: v1.9.2
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CGO_ENABLED: 0
name: Go-results-${{ matrix.go-version }}
path: TestResults-${{ matrix.go-version }}.json

0 comments on commit ab1c585

Please sign in to comment.