Skip to content

Commit

Permalink
Create go.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Pezcraft authored May 3, 2024
1 parent 9d97b7d commit 94fa667
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Go

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

jobs:

build:
name: Build + Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

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

- name: Postgres Docker
run: docker run -p 5432:5432 -d -e POSTGRES_HOST_AUTH_METHOD=trust postgres

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

- name: Test
run: go test -v ./...

sonarCloud:
name: SonarCloud
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: SonarCloud Scan
uses: SonarSource/sonarcloud-github-action@master
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

0 comments on commit 94fa667

Please sign in to comment.