Skip to content

Merge pull request #230 from nsg/fix-poetry #130

Merge pull request #230 from nsg/fix-poetry

Merge pull request #230 from nsg/fix-poetry #130

name: Build and release snap package to edge channel
on:
push:
branches:
- 'master'
paths-ignore:
- 'docs/**'
- '*.md'
- 'LICENSE'
workflow_dispatch:
jobs:
build-snap:
name: Build Snap Package
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Build snap package
uses: snapcore/action-build@v1
id: build
- name: Save snap artifact
uses: actions/upload-artifact@v4
with:
name: release-snap-package
if-no-files-found: error
path: |
${{ steps.build.outputs.snap }}
run-tests:
name: Run System Tests
runs-on: ubuntu-latest
needs: build-snap
services:
selenium:
image: selenium/standalone-chrome:latest
options: --shm-size=2gb
ports:
- 4444:4444
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Download snap artifact
uses: actions/download-artifact@v4
with:
name: release-snap-package
- name: TEST | Install package
run: sudo snap install --dangerous *.snap
- name: TEST | Run Prepare Tests
run: make test-prep -C tests
- name: TEST | Run Selenium Tests
run: make test-selenium -C tests
- name: Upload test report
uses: actions/upload-artifact@v4
if: always()
with:
name: selenium-test-report
path: |
tests/latest_logs
tests/report/
tests/assets/live.js
tests/assets/pytest_style.css
tests/dashboard.html
release:
name: Release Snap Package
runs-on: ubuntu-latest
needs: [build-snap, run-tests]
steps:
- name: Download snap artifact
uses: actions/download-artifact@v4
with:
name: release-snap-package
- name: Expand snap artifact name
id: snap-path
run: echo "SNAP_PATH=$(echo *.snap)" >> $GITHUB_OUTPUT
- name: Upload snap package to edge channel
uses: snapcore/action-publish@v1
env:
SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.STORE_LOGIN }}
with:
snap: ${{ steps.snap-path.outputs.SNAP_PATH }}
release: edge