Skip to content

Commit

Permalink
ci: add github action
Browse files Browse the repository at this point in the history
  • Loading branch information
Ren0503 committed Sep 22, 2024
1 parent 4912e52 commit 91c3bab
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# This workflow will build a golang project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go

name: Go

on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]

jobs:

build:
runs-on: ubuntu-latest
strategy:
matrix:
go-version: [ '1.22.x' ]
steps:
- uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.22.0'

- name: Install dependencies
run: go mod download

- name: Build
run: go build -v ./...

- name: Test
run: go test -cover ./...
3 changes: 3 additions & 0 deletions .husky/hooks/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/sh
golangci-lint run
git add .

0 comments on commit 91c3bab

Please sign in to comment.