Repository navigation
CI forensics for ssh/sudo e2e failures (temporary) #52
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| push: | |
| paths: | |
| - packages/** | |
| - tests/** | |
| - scripts/** | |
| - bun.lock | |
| branches: | |
| - main | |
| pull_request: | |
| paths: | |
| - packages/** | |
| - tests/** | |
| - scripts/** | |
| - bun.lock | |
| branches: | |
| - main | |
| permissions: | |
| contents: write | |
| id-token: write | |
| env: | |
| ACTION_CACHE_PATH: | | |
| ~/.bun/install/cache | |
| node_modules/ | |
| E2E_CONTAINERS_PATH: | | |
| ~/.local/share/containers | |
| tests/fixtures/container/cache | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| test: | |
| name: Run Tests | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - uses: actions/setup-node@v7 | |
| with: | |
| node-version: 24 | |
| - uses: oven-sh/setup-bun@v2 | |
| - uses: actions/cache@v6 | |
| with: | |
| path: ${{ env.ACTION_CACHE_PATH }} | |
| key: ${{ runner.os }} | |
| - run: bun install | |
| - run: bun run build | |
| - run: bun run test | |
| e2e: | |
| name: Run E2E Tests | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - uses: actions/setup-node@v7 | |
| with: | |
| node-version: 24 | |
| - uses: oven-sh/setup-bun@v2 | |
| - uses: actions/cache@v6 | |
| with: | |
| path: ${{ env.ACTION_CACHE_PATH }} | |
| key: ${{ runner.os }} | |
| - name: Cache podman containers storage | |
| uses: actions/cache@v6 | |
| with: | |
| path: ${{ env.E2E_CONTAINERS_PATH }} | |
| key: e2e-containers-${{ runner.os }}-${{ hashFiles('scripts/bootstrap-*.sh', 'tests/e2e/images.ts') }} | |
| restore-keys: | | |
| e2e-containers-${{ runner.os }}- | |
| - run: bun install | |
| - run: bun run build | |
| - name: Fix SSH test key permissions | |
| run: chmod 600 tests/fixtures/container/private_key | |
| - name: Bootstrap missing test images | |
| run: | | |
| declare -A IMAGES=( | |
| [fedora]="sysopkit-test-fedora:44" | |
| [debian]="sysopkit-test-debian:13" | |
| [redhat]="sysopkit-test-redhat:10" | |
| [arch]="sysopkit-test-arch:base" | |
| [openwrt]="sysopkit-test-openwrt:24.10" | |
| ) | |
| for distro in fedora debian redhat arch openwrt; do | |
| if podman image inspect "${IMAGES[$distro]}" >/dev/null 2>&1; then | |
| echo "present ${IMAGES[$distro]} (cache hit)" | |
| else | |
| echo "building ${IMAGES[$distro]}..." | |
| ./scripts/bootstrap-test-container.sh "$distro" | |
| fi | |
| done | |
| # TEMPORARY forensics for CI-only SSH/sudo failures (branch ci-forensics-ssh-sudo). | |
| # Remove after root cause is diagnosed. | |
| - name: Forensics (temporary) | |
| run: ./scripts/forensics-ci.sh | |
| - run: bun run test:e2e |