Skip to content

Commit

Permalink
[fix] go-testing workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
AndyBoWu committed Oct 7, 2024
1 parent 2662e31 commit 2ced3d6
Showing 1 changed file with 24 additions and 8 deletions.
32 changes: 24 additions & 8 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,40 @@
name: i386 linux tests
name: Go tests

on:
push:
branches: [ master ]
branches: [ main ]
pull_request:
branches: [ master ]
branches: [ main ]
workflow_dispatch:

jobs:
build:
runs-on: self-hosted
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5

- name: Set up Go
uses: actions/setup-go@v5
uses: actions/setup-go@v5
with:
go-version: 1.21.4
cache: false
cache: 'mod'

- name: Cache Go modules
uses: actions/cache@v4
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-mod-cache-${{ hashFiles('**/go.mod', '**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-mod-cache-latest
- name: Install dependencies
run: |
go mod download
- name: Run tests
run: go test -short ./...
env:
GOOS: linux
GOARCH: 386
GOARCH: amd64

0 comments on commit 2ced3d6

Please sign in to comment.