fix: build and test workflows

This commit is contained in:
Brendan Le Glaunec
2026-01-27 22:46:39 +01:00
parent e81eeb0c4d
commit bf720fcea2
3 changed files with 35 additions and 19 deletions
+26 -13
View File
@@ -14,30 +14,43 @@ jobs:
id-token: write id-token: write
steps: steps:
- name: Checkout code - name: Checkout code
uses: actions/checkout@v4 uses: actions/checkout@v6
with: with:
fetch-depth: 0 fetch-depth: 0
# We need to set a cache marker to ensure that the cache is individual for each job.
- name: Add Cache Marker
run: echo "go-build" > env.txt
- name: Install Go - name: Install Go
id: install-go id: install-go
uses: actions/setup-go@v5 uses: actions/setup-go@v6
with: with:
go-version-file: 'go.mod' go-version-file: 'go.mod'
cache-dependency-path: | cache: false
go.sum
env.txt - name: Cache Go mod
id: gomod
uses: actions/cache@v5
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-mod-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-mod-
- name: Cache Go build
uses: actions/cache@v5
with:
path: ~/.cache/go-build
key: ${{ runner.os }}-go-build-${{ github.ref_name }}
restore-keys: |
${{ runner.os }}-go-build-
- name: Download dependencies - name: Download dependencies
run: go mod download run: go mod download
if: steps.install-go.outputs.cache-hit != 'true' if: steps.gomod.outputs.cache-hit != 'true'
- name: Run GoReleaser - name: Run GoReleaser
uses: goreleaser/goreleaser-action@v6 uses: goreleaser/goreleaser-action@v6
env: env:
GORELEASER_CURRENT_TAG: ${{ github.ref_name }} GITHUB_TOKEN: ${{ secrets.GORELEASER_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
DOCKER_REPOSITORY: ullaakut/cameradar with:
GITHUB_TOKEN: ${{ secrets.GORELEASER_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} distribution: goreleaser
version: ${{ inputs.GORELEASER_VERSION }}
args: release --clean --snapshot --skip=docker
+9 -1
View File
@@ -42,7 +42,15 @@ jobs:
- name: Run Linter - name: Run Linter
uses: golangci/golangci-lint-action@v8 uses: golangci/golangci-lint-action@v8
with: with:
version: v2.10.2 version: v2.7.2
- name: Setup gotestsum
uses: gertd/action-gotestsum@v3.0.0
with:
gotestsum_version: v1.13.0
- name: Download nmap
run: sudo apt-get install -y nmap
- name: Run Tests - name: Run Tests
env: env:
-5
View File
@@ -1,5 +0,0 @@
#EXTM3U
#EXTINF:-1,127.0.0.1:8554 (GStreamer rtspd)
rtsp://admin:12345@127.0.0.1:8554/live.sdp
#EXTINF:-1,127.0.0.1:8555 (GStreamer rtspd)
rtsp://admin:12345@127.0.0.1:8555/live.sdp