Skip to content

Commit

Permalink
Pass snap name from build to test job
Browse files Browse the repository at this point in the history
  • Loading branch information
farshidtz committed Jan 22, 2024
1 parent 5ea13fe commit 7baca17
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions .github/workflows/build-and-test-snap.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ on:

jobs:
build:
outputs:
snap: ${{ steps.snapcraft.outputs.snap }}
runs-on: ubuntu-latest
steps:

Expand All @@ -18,13 +20,13 @@ jobs:

- name: Build snap
uses: snapcore/action-build@v1
id: build
id: snapcraft

- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: ${{ steps.build.outputs.snap }}
path: ${{ steps.build.outputs.snap }}
name: ${{ steps.snapcraft.outputs.snap }}
path: ${{ steps.snapcraft.outputs.snap }}

test:
needs: build
Expand All @@ -39,14 +41,14 @@ jobs:
- name: Download locally built snap
uses: actions/download-artifact@v4
with:
name: ${{needs.build.outputs.snap}}
name: ${{ needs.build.outputs.snap }}

- name: Run tests
shell: bash
working-directory: tests
env:
SKIP_TEARDOWN_REMOVAL: true
LOCAL_SERVICE_SNAP: ../${{needs.build.outputs.snap}}
LOCAL_SERVICE_SNAP: ../${{ needs.build.outputs.snap }}
run: |
go test -failfast -p 1 -timeout 30m -v
Expand Down

0 comments on commit 7baca17

Please sign in to comment.