Skip to content

Commit

Permalink
test an integration test
Browse files Browse the repository at this point in the history
  • Loading branch information
MadsRC committed May 19, 2024
1 parent be69dd8 commit 4da5343
Showing 1 changed file with 46 additions and 0 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/integration-test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

on:
push:
branches:
- testintegrationtest

# Declare default permissions as read only.
permissions: read-all

name: Release
jobs:
release:
permissions:
contents: write
packages: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4
with:
# Disabling shallow clone is recommended for improving relevancy of reporting
fetch-depth: 0
- name: 'Login to GitHub Container Registry'
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{github.actor}}
password: ${{secrets.GITHUB_TOKEN}}
- name: Get syft
uses: anchore/sbom-action/[email protected]
- name: Set up Go
uses: actions/setup-go@v5
- id: create-release
name: Run GoReleaser
uses: goreleaser/goreleaser-action@v5
with:
args: release --snapshot --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Run integration check
run: |
image=$(echo '${{ steps.create-release.outputs.artifacts }}' | jq '.[] | select(.type=="Docker Image") | select(.extra.DockerConfig.goos=="linux") | select(.extra.DockerConfig.goarch=="amd64") | select(.name|contains("-SNAPSHOT-")) | .name' -r)
echo "Testing image ${image}"
mise run test:integration --test-image="${image}"

0 comments on commit 4da5343

Please sign in to comment.