Files
hamview/.gitea/workflows/dev.yaml
maze 0bf5f8b10b
Some checks failed
Run tests / build (amd64, , linux) (push) Has been cancelled
Run tests / build (arm, 6, linux) (push) Has been cancelled
Run tests / build (arm, 7, linux) (push) Has been cancelled
Run tests / build (stable) (push) Has been cancelled
Run tests / test (stable) (push) Has been cancelled
Multiarch
2026-02-23 12:19:56 +01:00

91 lines
2.6 KiB
YAML

name: Run tests
on:
push:
permissions:
contents: read
jobs:
test:
strategy:
matrix:
go: [stable]
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Setup Go
uses: actions/setup-go@v6
with:
go-version: ${{ matrix.go }}
#- name: golangci-lint
# uses: golangci/golangci-lint-action@v9
# with:
# go-version: ${{ matrix.go }}
# version: v2.6
build:
strategy:
matrix:
go: [stable]
include:
- goos: linux
goarch: amd64
goarm: ""
- goos: linux
goarch: arm
goarm: "6"
- goos: linux
goarch: arm
goarm: "7"
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Setup Go
uses: actions/setup-go@v6
with:
go-version: ${{ matrix.go }}
- name: Set target variables
run: |
echo "GOOS=${{ matrix.goos }}" >> $GITHUB_ENV
echo "GOARCH=${{ matrix.goarch }}" >> $GITHUB_ENV
if [ -n "${{ matrix.goarm }}" ]; then
echo "GOARM=${{ matrix.goarm }}" >> $GITHUB_ENV
fi
- name: Download modules
run: go mod download
- name: Make build directory
run: mkdir -p build
- name: Build hamview-collector (${{ matrix.goos}} ${{ matrix.goarch }}${{ matrix.goarm }})
run: go build -o build/hamview-collector.${{ matrix.goarch }}${{ matrix.goarm }} -v ./cmd/hamview-collector
- name: Build hamview-receiver (${{ matrix.goos}} ${{ matrix.goarch }}${{ matrix.goarm }})
run: go build -o build/hamview-receiver.${{ matrix.goarch }}${{ matrix.goarm }} -v ./cmd/hamview-receiver
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Show env
run: env
- name: Log into Container Registry
uses: docker/login-action@v3
with:
registry: ${{ vars.REGISTRY }}
username: ${{ vars.DEPLOY_USER }}
password: ${{ secrets.DEPLOY_TOKEN }}
- name: Build and push collector container
uses: docker/build-push-action@v6
with:
push: true
tags: hamview/collector:latest
context: cmd/hamview-collector
platforms: |
linux/amd64
- name: Build and push receiver container
uses: docker/build-push-action@v6
with:
push: true
tags: hamview/receiver:latest
context: cmd/hamview-receiver
platforms: |
linux/amd64
linux/arm/v6
linux/arm/v7