Skip to content

Clean code.

Clean code. #3

Workflow file for this run

name: Audit
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
audit:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.21
- name: Verify dependencies
run: go mod verify
- name: Prepare build dir
run: mkdir build
- name: Build Linux
run: go build -ldflags "-s -w" -o build/mosaic
- name: Build Win
run: env GOOS=windows GOARCH=amd64 go build -ldflags "-s -w" -o build/mosaic.exe
- name: Build Mac
run: env GOOS=darwin GOARCH=amd64 go build -ldflags "-s -w" -o build/mosaic-darwin
- name: Eun docker compose
run: docker compose -f "docker-compose.yml" up -d
- name: Run tests
run: go test -race -vet=off ./...
- name: 'Upload Artifact'
uses: actions/upload-artifact@v3
with:
name: artifact
path: build
retention-days: 30