Merge pull request #3 from Webfleet-Solutions/prepare-release/0.5.2 #6
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: Test and build | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
permissions: write-all | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/setup-go@v4 | |
with: | |
go-version: '1.19' | |
- uses: actions/[email protected] | |
- name: Test With Coverage | |
run: go test -v -race -coverprofile=coverage.txt -covermode=atomic ./... | |
- name: Upload coverage to Codecov | |
uses: codecov/[email protected] | |
with: | |
files: coverage.txt | |
- name: golangci-lint | |
uses: golangci/[email protected] | |
with: | |
args: --timeout=5m | |
# since go test already does it in a previous step | |
skip-pkg-cache: true | |
build-image: | |
runs-on: ubuntu-latest | |
needs: test | |
steps: | |
- | |
name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- | |
name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- | |
name: Build image | |
uses: docker/build-push-action@v5 | |
with: | |
# Only for CI testing purposes | |
push: false | |
tags: wfs/k8s-image-availability-exporter:latest |