Skip to content

chore: avoid template and reuse dockers #74

chore: avoid template and reuse dockers

chore: avoid template and reuse dockers #74

Workflow file for this run

name: ci
on:
push:
branches:
- '**'
jobs:
build:
runs-on: ubuntu-22.04
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 1.21
- name: Print Go environment
run: go env
- name: Build Application
run: make build
# needs: build, in other jobs is to utilize the go cache created by build
lint:
needs: build
runs-on: ubuntu-22.04
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 1.21
- name: Run Lint
uses: golangci/golangci-lint-action@v6
with:
version: v1.59
args: --timeout=10m
unit-tests:
needs: build
runs-on: ubuntu-22.04
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 1.21
- name: Run Unit Tests
run: |
make test
check-mock-gen:
needs: build
runs-on: ubuntu-22.04
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 1.21
- name: Run make mock-gen
run: make mocks
- name: Check for uncommitted changes
run: |
if ! git diff --exit-code; then
echo "Uncommitted changes detected. Please run 'make mocks' before committing."
exit 1
fi
build-integration-tests:
needs: build
runs-on: ubuntu-22.04
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Build E2E Dockers
run: |
sudo make build-docker-e2e
run-integration-tests:
needs: build-integration-tests
runs-on: ubuntu-22.04
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Run E2E Tests
run: |
sudo make test-e2e-cache