dev/actions #26
@@ -3,8 +3,25 @@ run-name: ${{ gitea.actor }} is testing golang Code
|
||||
on: [push]
|
||||
|
||||
jobs:
|
||||
Run-Go-Test:
|
||||
runs-on: golang
|
||||
test:
|
||||
runs-on: docker
|
||||
container:
|
||||
image: golang:1.22
|
||||
steps:
|
||||
- run: go version
|
||||
- run: go test ./...
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Go cache
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: |
|
||||
~/go/pkg/mod
|
||||
~/.cache/go-build
|
||||
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-go-
|
||||
|
||||
- name: Run tests
|
||||
run: |
|
||||
go mod tidy
|
||||
go test ./... -v
|
||||
|
||||
Reference in New Issue
Block a user