mirror of
https://github.com/safedep/pmg.git
synced 2026-08-03 07:24:09 +02:00
test: Add E2E for linux sandbox
This commit is contained in:
@@ -443,3 +443,52 @@ jobs:
|
||||
|
||||
- name: Run Sandbox E2E Test
|
||||
run: pmg --sandbox npm exec -- node test/sandbox-e2e.js
|
||||
|
||||
sandbox-e2e-linux:
|
||||
name: Sandbox E2E - Linux (Bubblewrap)
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 10
|
||||
steps:
|
||||
- name: Checkout Source
|
||||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
|
||||
|
||||
- name: Setup Go
|
||||
uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5
|
||||
with:
|
||||
go-version-file: go.mod
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
|
||||
with:
|
||||
node-version: 20
|
||||
check-latest: true
|
||||
|
||||
- name: Install Bubblewrap
|
||||
run: sudo apt-get update && sudo apt-get install -y bubblewrap
|
||||
|
||||
- name: Verify Bubblewrap Installation
|
||||
run: bwrap --version
|
||||
|
||||
- name: Build PMG
|
||||
run: make
|
||||
|
||||
- name: Add pmg to PATH
|
||||
run: echo "$GITHUB_WORKSPACE/bin" >> $GITHUB_PATH
|
||||
|
||||
- name: Setup PMG
|
||||
run: pmg setup install
|
||||
|
||||
- name: Create Test Directories for Sandbox Permissions Tests
|
||||
run: mkdir -p ~/.aws ~/.gcloud ~/.kube ~/.ssh ~/.gnupg ~/.docker
|
||||
|
||||
- name: Create Test Files for Sandbox Permissions Tests
|
||||
run: |
|
||||
touch ~/.aws/credentials
|
||||
touch ~/.gcloud/credentials.json
|
||||
touch ~/.kube/config
|
||||
touch ~/.ssh/id_rsa
|
||||
touch ~/.gnupg/pubring.kbx
|
||||
touch ~/.docker/config.json
|
||||
|
||||
- name: Run Sandbox E2E Test
|
||||
run: pmg --sandbox --sandbox-profile npm-restrictive npm exec -- node test/sandbox-e2e.js
|
||||
|
||||
Reference in New Issue
Block a user