63 lines
1.7 KiB
YAML
63 lines
1.7 KiB
YAML
name: Run tests
|
|
on:
|
|
push:
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
test:
|
|
strategy:
|
|
matrix:
|
|
go: [stable, 1.25]
|
|
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:
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v6
|
|
- name: Setup Go
|
|
uses: actions/setup-go@v6
|
|
with:
|
|
go-version: stable
|
|
- name: Download modules
|
|
run: go mod download
|
|
- name: Make build directory
|
|
run: mkdir -p build
|
|
- name: Build hamview-collector
|
|
run: go build -o build/ -v ./cmd/hamview-collector
|
|
- name: Build hamview-receiver
|
|
run: go build -o build/ -v ./cmd/hamview-receiver
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v3
|
|
- name: Log into Container Registry
|
|
uses: docker/login-action@v3
|
|
with:
|
|
registry: ${{ env.REGISTRY }}
|
|
username: ${{ env.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
|
|
- name: Build and push receiver container
|
|
uses: docker/build-push-action@v6
|
|
with:
|
|
push: true
|
|
tags: hamview/receiver:latest
|
|
context: cmd/hamview-receiver
|