feat: updating workflows #2 #5
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "Build" | |
on: | |
push: | |
branches: [master] | |
pull_request: | |
branches: [master] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
env: | |
GO111MODULE: on | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up GO 1.18.x | |
uses: actions/setup-go@v5 | |
with: | |
go-version: '1.18' | |
check-latest: true | |
- run: echo "$(go env GOPATH)/bin" >> $GITHUB_PATH | |
- name: Setup Environment | |
run: make ci-build-setup | |
- name: Build | |
run: make build | |
test: | |
runs-on: ubuntu-latest | |
env: | |
GO111MODULE: on | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up GO 1.18.x | |
uses: actions/setup-go@v5 | |
with: | |
go-version: '1.18' | |
check-latest: true | |
- run: echo "$(go env GOPATH)/bin" >> $GITHUB_PATH | |
- name: Setup Environment | |
run: make ci-build-setup | |
- name: Run unit tests | |
run: make test | |
testacc: | |
runs-on: ubuntu-latest | |
env: | |
GO111MODULE: on | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up GO 1.18.x | |
uses: actions/setup-go@v5 | |
with: | |
go-version: '1.18' | |
check-latest: true | |
- run: echo "$(go env GOPATH)/bin" >> $GITHUB_PATH | |
- name: Login to Docker Hub | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Setup Environment | |
run: make ci-build-setup | |
- name: Start k3s | |
run: make k3s-start | |
- name: Run acceptance tests | |
run: make testacc | |
- name: Stop k3s | |
run: make k3s-stop | |
fmtcheck: | |
runs-on: ubuntu-latest | |
env: | |
GO111MODULE: on | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up GO 1.18.x | |
uses: actions/setup-go@v5 | |
with: | |
go-version: '1.18' | |
check-latest: true | |
- run: echo "$(go env GOPATH)/bin" >> $GITHUB_PATH | |
- name: Setup Environment | |
run: make ci-build-setup | |
- name: Format check | |
run: make fmtcheck | |
vet: | |
runs-on: ubuntu-latest | |
env: | |
GO111MODULE: on | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up GO 1.18.x | |
uses: actions/setup-go@v5 | |
with: | |
go-version: '1.18' | |
check-latest: true | |
- run: echo "$(go env GOPATH)/bin" >> $GITHUB_PATH | |
- name: Setup Environment | |
run: make ci-build-setup | |
- name: Run vet | |
run: make vet |