File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : snap-strict
2+ on :
3+ workflow_dispatch :
4+ push :
5+ branches : [fix/snap-strict-release]
6+ permissions :
7+ contents : read
8+ jobs :
9+ snap :
10+ runs-on : ubuntu-24.04
11+ timeout-minutes : 60
12+ steps :
13+ - uses : actions/checkout@v4
14+ - name : Build strict snap
15+ uses : snapcore/action-build@v1
16+ id : build
17+ - name : Verify confinement and install test package
18+ env :
19+ SNAP_FILE : ${{ steps.build.outputs.snap }}
20+ run : |
21+ unsquashfs -cat "$SNAP_FILE" meta/snap.yaml > snap-metadata.yaml
22+ grep -qx 'confinement: strict' snap-metadata.yaml
23+ sudo snap install --dangerous "$SNAP_FILE"
24+ - name : Test bundled compiler and actual GUI under confinement
25+ run : |
26+ mkdir -p "$HOME/snap/medha-ide/common"
27+ timeout 180 snap run medha-ide --selftest
28+ export QT_QPA_PLATFORM=offscreen
29+ export MEDHA_SMOKE_RESULT="$HOME/snap/medha-ide/common/gui-smoke.json"
30+ timeout 180 snap run medha-ide --smoke-gui
31+ python3 -c 'import json,os; assert json.load(open(os.environ["MEDHA_SMOKE_RESULT"]))["status"] == "PASS"'
32+ - name : Collect test evidence
33+ if : always()
34+ run : |
35+ mkdir -p snap-evidence
36+ cp snap-metadata.yaml snap-evidence/ 2>/dev/null || true
37+ cp "$HOME"/snap/medha-ide/common/gui-smoke.* snap-evidence/ 2>/dev/null || true
38+ - uses : actions/upload-artifact@v4
39+ if : always()
40+ with :
41+ name : medha-strict-snap
42+ path : |
43+ ${{ steps.build.outputs.snap }}
44+ snap-evidence/
45+ if-no-files-found : error
You can’t perform that action at this time.
0 commit comments