refactor how activities are queried #367
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 & Test | |
on: [push] | |
env: | |
IMAGE: saferwall/webapis | |
jobs: | |
test: | |
name: Build & Test Go Package | |
strategy: | |
matrix: | |
go-version: [1.21.x] | |
os: [ubuntu-latest] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: ${{ matrix.go-version }} | |
- name: Build | |
run: | | |
go env -w GOFLAGS=-mod=mod | |
go build -v ./... | |
- name: Test With Coverage | |
run: go test ./... -race -coverprofile=coverage -covermode=atomic | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v4 | |
with: | |
files: ./coverage | |
- name: golangci-lint | |
uses: golangci/golangci-lint-action@v6 | |
with: | |
version: v1.59 | |
build-container: | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Build container | |
id: docker_build | |
uses: docker/build-push-action@v6 | |
with: | |
push: false | |
tags: ${{ env.IMAGE }}:latest |