From b12b1d229ba2144262d5a6da79d869d0fd472c8a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Damien=20Pl=C3=A9nard?= Date: Mon, 29 Jul 2024 22:44:05 +0200 Subject: [PATCH] ci: test one binary on build --- .github/workflows/build.yml | 3 +++ .github/workflows/publish.yml | 3 +++ 2 files changed, 6 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 367d83e..014ccd3 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -20,6 +20,8 @@ jobs: with: name: build path: .build + - name: Test binary + run: .build/linux-amd64/twitch_exporter --help docker: needs: golang @@ -35,3 +37,4 @@ jobs: - name: Fix permission on binaries artifacts run: find . -type f -name 'twitch_exporter' -exec chmod +x {} + - run: make docker + - run: docker run docker.io/damoun/twitch-exporter-linux-amd64:HEAD --help diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 5ddd283..f300015 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -23,6 +23,8 @@ jobs: with: name: build path: .build + - name: Test binary + run: .build/linux-amd64/twitch_exporter --help publish: needs: build @@ -50,3 +52,4 @@ jobs: make docker-tag-latest DOCKER_IMAGE_TAG="${{ github.ref_name }}" make docker-publish DOCKER_IMAGE_TAG="latest" make docker-manifest DOCKER_IMAGE_TAG="latest" + - run: docker run docker.io/damoun/twitch-exporter-linux-amd64:main --help