Skip to content

Commit

Permalink
Create go.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
sysulq authored Jun 21, 2024
1 parent cc6d408 commit 1c029a8
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Build and Test

on:
push:
branches:
- 'master'
pull_request:

jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
version: ["1.21.x", "1.22.x"]
services:
redis:
image: redis
ports:
- 6379:6379
steps:
- name: Check out repository
uses: actions/checkout@v4

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

- name: generate and test
run: go test -race -cover -coverprofile=coverage.out ./...

- uses: codecov/codecov-action@v4
env:
CODECOV_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
files: ./coverage.out

0 comments on commit 1c029a8

Please sign in to comment.