Skip to content

Commit

Permalink
chore: Github actions to test/lint code
Browse files Browse the repository at this point in the history
  • Loading branch information
mauricioabreu committed Apr 7, 2024
1 parent c917ec6 commit c4d5164
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 0 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# 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: [ "main" ]
pull_request:
branches: [ "main" ]

jobs:

workflow:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

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

- uses: extractions/setup-just@v1

- name: Test
run: just test

- name: Lint
uses: golangci/golangci-lint-action@v3
with:
version: v1.57.2
args: --out-format=colored-line-number -v ./...

- name: Build
run: go build -v ./...
3 changes: 3 additions & 0 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,8 @@ worker:
deps:
docker compose up

test:
go test -v ./...

lint:
golangci-lint run -v ./...

0 comments on commit c4d5164

Please sign in to comment.