Skip to content

Commit

Permalink
chore: add action workflow for test (#23)
Browse files Browse the repository at this point in the history
增加github action用于单元测试
  • Loading branch information
kites262 authored Nov 2, 2024
1 parent 5d6d8b2 commit 2629e4a
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: CI on push&pr

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with:
cache: false #消除未找到go.sum缓存文件的警告
go-version: '1.21.0'
- name: Install dependencies
run: go get .
- name: Build
run: go build -v ./...
- name: Test with the Go CLI
run: go test

0 comments on commit 2629e4a

Please sign in to comment.