Skip to content

Commit

Permalink
[gha] Check Go files are properly formatted (#418)
Browse files Browse the repository at this point in the history
  • Loading branch information
nathan-artie authored Jun 25, 2024
1 parent 3b6e1b1 commit b702aeb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/gha-go-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ run-name: Running tests
on: [push]
jobs:
test:
runs-on: ubuntu-latest
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Go
Expand All @@ -13,12 +13,14 @@ jobs:
- name: Run staticcheck
env:
SC_VERSION: 2023.1.7
run: |
run: |
make generate
SC_URL="https://github.com/dominikh/go-tools/releases/download/$SC_VERSION/staticcheck_linux_amd64.tar.gz"
wget -q ${SC_URL} -O - | tar -xzf - --strip-components 1 -C /usr/local/bin staticcheck/staticcheck
make static
- name: Run test
- name: Run tests
run: make test
- name: Run race condition check
run: make race
- name: Check Go files are properly formatted
run: test -z $(gofmt -l .)
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import (
"context"
"flag"
"fmt"
"github.com/artie-labs/reader/sources/mssql"
"log/slog"

"github.com/artie-labs/reader/config"
Expand All @@ -14,6 +13,7 @@ import (
"github.com/artie-labs/reader/sources"
"github.com/artie-labs/reader/sources/dynamodb"
"github.com/artie-labs/reader/sources/mongo"
"github.com/artie-labs/reader/sources/mssql"
"github.com/artie-labs/reader/sources/mysql"
"github.com/artie-labs/reader/sources/postgres"
"github.com/artie-labs/reader/writers"
Expand Down

0 comments on commit b702aeb

Please sign in to comment.