Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 53 additions & 1 deletion .github/workflows/pr-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,13 @@ jobs:
go test -race -short -count=1 -v ./e2e/tests/up-docker-compose \
-run '^TestExpectedUIDMapping$'

- name: test workspace fixture helpers
run: go test -race -short -count=1 -timeout 90s ./e2e/tests/up

- name: test Linux registry fixture
if: runner.os == 'Linux'
run: go test -race -count=1 -timeout 90s ./e2e/framework/registryfixture

provider-update-windows:
name: Provider Update Tests (windows-latest)
needs: [changes]
Expand Down Expand Up @@ -257,6 +264,17 @@ jobs:
CGO_ENABLED: 0
run: go build -trimpath -o "${RUNNER_TEMP}/devsy-ci-microsandbox" ./hack/microsandbox

- name: build pinned runtime performance tools
if: runner.os == 'Linux'
run: '"${RUNNER_TEMP}/devsy-ci-microsandbox" build-performance-tools --output-dir "${RUNNER_TEMP}/runtime-performance-tools"'

- name: upload runtime performance tools
if: runner.os == 'Linux'
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
with:
name: runtime-performance-tools-linux
path: ${{ runner.temp }}/runtime-performance-tools/

- name: upload MicroSandbox CI helper
if: runner.os == 'Linux'
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
Expand Down Expand Up @@ -407,6 +425,9 @@ jobs:
expected-spec-count: 6
- label: up-provider-microsandbox-compatibility
expected-spec-count: 2
- label: up-provider-microsandbox-registry-consumer
expected-spec-count: 3
provider-mode: external
runs-on: ubuntu-latest
timeout-minutes: 25
steps:
Expand All @@ -428,6 +449,28 @@ jobs:
name: e2e-test-linux
path: ./e2e/

- name: download runtime performance tools
if: matrix.label == 'up-provider-microsandbox'
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8
with:
name: runtime-performance-tools-linux
path: ${{ runner.temp }}/runtime-performance-tools/

- name: prepare runtime performance capture
if: matrix.label == 'up-provider-microsandbox'
shell: bash
run: |
chmod +x "${RUNNER_TEMP}/runtime-performance-tools/devsy-runtime-spawn-probe" \
"${RUNNER_TEMP}/runtime-performance-tools/devsy-runtime-supervisor"
install -d -m 700 "${RUNNER_TEMP}/microsandbox-performance"
{
echo "DEVSY_TEST_RUNTIME_SPAWN_PROBE=${RUNNER_TEMP}/runtime-performance-tools/devsy-runtime-spawn-probe"
echo "DEVSY_TEST_RUNTIME_SUPERVISOR=${RUNNER_TEMP}/runtime-performance-tools/devsy-runtime-supervisor"
echo "DEVSY_TEST_RUNTIME_PERFORMANCE_DIR=${RUNNER_TEMP}/microsandbox-performance"
echo "DEVSY_TEST_RUNTIME_REVISION=${{ github.sha }}"
echo "DEVSY_TEST_RUNTIME_SDK_VERSION=$(cat "${RUNNER_TEMP}/runtime-performance-tools/sdk-version")"
} >> "$GITHUB_ENV"

- name: download MicroSandbox CI helper
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8
with:
Expand Down Expand Up @@ -466,7 +509,7 @@ jobs:
GH_CREDENTIAL_USERNAME: x-access-token
TEST_TIMEOUT: 1200s
DEVSY_REQUIRE_MICROSANDBOX: "true"
run: '"${RUNNER_TEMP}/devsy-ci-microsandbox" run --label "${{ matrix.label }}" --expected-count "${{ matrix.expected-spec-count }}"'
run: '"${RUNNER_TEMP}/devsy-ci-microsandbox" run --label "${{ matrix.label }}" --expected-count "${{ matrix.expected-spec-count }}" --provider-mode "${{ matrix.provider-mode || ''parity'' }}"'

- name: upload MicroSandbox test evidence
if: always()
Expand All @@ -479,6 +522,15 @@ jobs:
if-no-files-found: warn
retention-days: 14

- name: upload runtime performance evidence
if: always() && matrix.label == 'up-provider-microsandbox'
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
with:
name: microsandbox-runtime-performance
path: ${{ runner.temp }}/microsandbox-performance/provider-performance.json
if-no-files-found: error
retention-days: 14

integration-tests:
name: Test ${{ matrix.label }}${{ (matrix.install-podman == 'rootless' || matrix.install-podman == 'rootful') && format(' ({0})', matrix.install-podman) || '' }} on ${{ matrix.runner }}
needs: [changes, can-read-secret, build-cli]
Expand Down
9 changes: 9 additions & 0 deletions e2e/credential_helper_linux_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
//go:build linux

package e2e

import "github.com/devsy-org/devsy/e2e/framework/registryfixture"

func dispatchFixtureCredentialHelper() (bool, int) {
return registryfixture.DispatchCredentialHelper()
}
7 changes: 7 additions & 0 deletions e2e/credential_helper_other_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
//go:build !linux

package e2e

func dispatchFixtureCredentialHelper() (bool, int) {
return false, 0
}
3 changes: 3 additions & 0 deletions e2e/e2e_suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ func TestMain(m *testing.M) {
cmd.Execute()
return
}
if handled, code := dispatchFixtureCredentialHelper(); handled {
os.Exit(code)
}
os.Exit(m.Run())
}

Expand Down
Loading
Loading