Skip to content

Commit

Permalink
Add GitHub Actions workflow for Go tests on dev branch
Browse files Browse the repository at this point in the history
  • Loading branch information
YidiDev committed Sep 1, 2024
1 parent 3616fc6 commit c066370
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Go

on:
push:
branches:
- dev
pull_request:
branches:
- dev

jobs:
test:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Set up Go
uses: actions/checkout@v2
with:
go-version: '^1.23.0'

- name: Cache Go Modules
id: cache-modules
uses: actions/checkout@v2
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Install dependencies
run: go mod download

- name: Run tests
run: go test -v ./...

0 comments on commit c066370

Please sign in to comment.