Merge pull request #338 from sabiut/feature/integration-tests

feat: add integration tests for build artifacts
This commit is contained in:
Aaddrick
2026-04-12 15:21:51 -04:00
committed by GitHub
6 changed files with 502 additions and 1 deletions

View File

@@ -53,6 +53,11 @@ jobs:
artifact_suffix: ${{ matrix.artifact_suffix }}
release_tag: ${{ startsWith(github.ref, 'refs/tags/v') && github.ref_name || '' }}
test-artifacts:
name: Test Build Artifacts
needs: [build-amd64]
uses: ./.github/workflows/test-artifacts.yml
build-arm64:
name: Build Packages (arm64 - ${{ matrix.artifact_suffix }})
needs: test-flags
@@ -80,7 +85,7 @@ jobs:
release:
name: Create Release
if: startsWith(github.ref, 'refs/tags/v')
needs: [test-flags, build-amd64, build-arm64]
needs: [test-flags, build-amd64, build-arm64, test-artifacts]
runs-on: ubuntu-latest
permissions:
contents: write

52
.github/workflows/test-artifacts.yml vendored Normal file
View File

@@ -0,0 +1,52 @@
name: Test Build Artifacts (Reusable)
on:
workflow_call:
permissions:
contents: read
jobs:
test-artifact:
strategy:
fail-fast: false
matrix:
include:
- format: deb
artifact: package-amd64-deb
container: ""
- format: rpm
artifact: package-amd64-rpm
container: "fedora:42"
- format: appimage
artifact: package-amd64-appimage
container: ""
name: Validate ${{ matrix.format }} package
runs-on: ubuntu-latest
container: ${{ matrix.container || '' }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Download artifact
uses: actions/download-artifact@v4
with:
name: ${{ matrix.artifact }}
path: artifacts/
- name: Install test dependencies (Fedora)
if: matrix.format == 'rpm'
run: dnf install -y findutils file nodejs npm
- name: Install test dependencies (Ubuntu)
if: matrix.format != 'rpm'
run: |
sudo apt-get update
sudo apt-get install -y file libfuse2 nodejs npm
- name: Run artifact tests
run: |
chmod +x tests/test-artifact-${{ matrix.format }}.sh
tests/test-artifact-${{ matrix.format }}.sh artifacts/