mirror of
https://github.com/zu1k/nali.git
synced 2025-02-03 10:52:41 +08:00
fc7db2ff71
Signed-off-by: zu1k <i@zu1k.com>
31 lines
654 B
YAML
31 lines
654 B
YAML
name: Go
|
|
on: [push, pull_request]
|
|
jobs:
|
|
|
|
build:
|
|
name: Build
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Setup Go
|
|
uses: actions/setup-go@v3
|
|
with:
|
|
go-version: '^1.18'
|
|
|
|
- name: Check out code into the Go module directory
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Cache go module
|
|
uses: actions/cache@v3
|
|
with:
|
|
path: ~/go/pkg/mod
|
|
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-go-
|
|
|
|
- name: Get dependencies and run test
|
|
run: |
|
|
go test ./...
|
|
|
|
- name: Build
|
|
run: go build
|