Skip to content

Commit

Permalink
Create ci workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
koki-develop committed Mar 5, 2024
1 parent 2e06ce9 commit b3b069e
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
name: Setup

runs:
using: composite
steps:
- uses: actions/setup-go@v4
with:
go-version-file: go.mod
cache: true
35 changes: 35 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: ci

on:
push:

jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup
uses: ./.github/actions/setup
- name: Test
run: go test ./... -race -coverprofile=coverage.out -covermode=atomic

build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup
uses: ./.github/actions/setup
- name: Build
run: go build .

lint:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup
uses: ./.github/actions/setup
- name: Lint
uses: golangci/golangci-lint-action@v4

0 comments on commit b3b069e

Please sign in to comment.