Skip to content

Add explanation and link for OTBR snap usage (#43) #32

Add explanation and link for OTBR snap usage (#43)

Add explanation and link for OTBR snap usage (#43) #32

name: Snap Tester
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
# Allow manual trigger
workflow_dispatch:
jobs:
build:
outputs:
snap: ${{ steps.snapcraft.outputs.snap }}
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Build snap
uses: snapcore/action-build@v1
id: snapcraft
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: ${{ steps.snapcraft.outputs.snap }}
path: ${{ steps.snapcraft.outputs.snap }}
if-no-files-found: error
test:
needs: build
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
lfs: true
- name: Download locally built snap
uses: actions/download-artifact@v4
with:
name: ${{ needs.build.outputs.snap }}
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: '1.*'
cache: false
- name: Run tests
shell: bash
working-directory: tests
env:
SKIP_TEARDOWN_REMOVAL: true
LOCAL_SERVICE_SNAP: ../${{ needs.build.outputs.snap }}
run: |
go test -failfast -p 1 -timeout 30m -v
- name: Upload snap logs
if: always()
uses: actions/upload-artifact@v4
with:
name: logs
path: tests/*.log