Skip to content

Merge pull request #24 from werniq/fix/factory-interface-params #319

Merge pull request #24 from werniq/fix/factory-interface-params

Merge pull request #24 from werniq/fix/factory-interface-params #319

Workflow file for this run

name: Go-Gator
on:
push
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
launch:
runs-on: ubuntu-22.04
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.21'
- name: Install go-tools using go get
run:
go get -u honnef.co/go/tools
- name: Explicit installment of staticcheck
run:
go install honnef.co/go/tools/cmd/[email protected]
- name: Install go-task with curl
run:
sh -c "$(curl --location https://taskfile.dev/install.sh)" -- -d -b ~/.local/bin
- name: Format code using go fmt
run: task fmt
- name: Analyze code for bugs and errors
run: task vet
- name: Clean go.mod dependencies
run: task clean
- name: Run staticcheck on the project
run: task stch
- name: Check for differences and fail if changes were detected
run: |
git diff --exit-code || echo "has-diff=true" >> $GITHUB_ENV
if [ "$has-diff" = "true" ]; then
echo 'Go fmt formatted files. Please, prepare files before pushing to the main branch. Exiting...'
exit 1
fi
- name: Test application
run: task test
- name: Build docker image
run:
docker build -t go-gator .