Skip to content

[juju] Add checks for 3 CVEs (#985) #98

[juju] Add checks for 3 CVEs (#985)

[juju] Add checks for 3 CVEs (#985) #98

name: Build snap
on:
- push
- pull_request
- workflow_dispatch
jobs:
snap:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: snapcore/action-build@v1
id: snapcraft
- name: Install snap
run: |
sudo snap install --dangerous ${{ steps.snapcraft.outputs.snap }}
- name: Run snap (functional test)
run: hotsos > output.yaml && exit 1 || echo 'pass'
- name: Run snap (JSON output)
run: hotsos --format json tests/unit/fake_data_root/openstack > output.json
- name: Run snap (HTML output)
run: hotsos --format html tests/unit/fake_data_root/openstack > output.html
- name: Run snap (Markdown output)
run: hotsos --format markdown tests/unit/fake_data_root/openstack > output.md
- name: Upload snap
uses: actions/upload-artifact@v4
with:
name: snap
path: ${{ steps.snapcraft.outputs.snap }}
- name: Upload logs
uses: actions/upload-artifact@v4
if: failure()
with:
name: snap-logs
path: /home/runner/.cache/snapcraft/log/*.log
- name: Upload outputs
uses: actions/upload-artifact@v4
if: always()
with:
name: functional-test-outputs
path: output.*