1
0
mirror of https://github.com/zu1k/nali.git synced 2025-01-23 05:39:03 +08:00
nali/.github/workflows/go.yml

31 lines
654 B
YAML
Raw Normal View History

2020-07-17 09:05:25 +08:00
name: Go
on: [push, pull_request]
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Setup Go
uses: actions/setup-go@v3
2020-07-17 09:05:25 +08:00
with:
go-version: '^1.18'
2020-07-17 09:05:25 +08:00
- name: Check out code into the Go module directory
uses: actions/checkout@v3
2020-07-17 09:05:25 +08:00
- name: Cache go module
uses: actions/cache@v3
2020-07-17 09:05:25 +08:00
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
2020-07-17 11:49:49 +08:00
- name: Get dependencies and run test
run: |
go test ./...
2020-07-17 09:05:25 +08:00
- name: Build
run: go build