Files
Pulse/.github/workflows/test-updates.yml
rcourtman 1490a6e6e3 revert: remove dual-key license verification
Restored original license signing key from backup - key was never
compromised (private repo). Removes unnecessary dual-key complexity:

- Remove legacyPublicKey and SetLegacyPublicKey from license.go
- Simplify signature verification to single key
- Remove EmbeddedLegacyPublicKey from pubkey.go
- Remove PULSE_LICENSE_LEGACY_PUBLIC_KEY from Dockerfile and workflows
- Remove dual-key test
- Simplify mock.env
2026-02-03 21:29:21 +00:00

124 lines
3.7 KiB
YAML

name: Update Integration Tests
on:
pull_request:
paths:
# Trigger on changes to update-related code
- 'internal/updates/**'
- 'internal/api/updates.go'
- 'internal/api/rate_limit*.go'
- 'frontend-modern/src/components/Update*.tsx'
- 'frontend-modern/src/api/updates.ts'
- 'frontend-modern/src/stores/updates.ts'
- 'tests/integration/**'
- '.github/workflows/test-updates.yml'
push:
branches:
- main
- master
paths:
- 'internal/updates/**'
- 'internal/api/updates.go'
- 'frontend-modern/src/components/Update*.tsx'
- 'tests/integration/**'
workflow_dispatch: # Allow manual triggering
jobs:
integration-tests:
name: Update Flow Integration Tests
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
cache: true
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
cache-dependency-path: tests/integration/package-lock.json
- name: Install Playwright dependencies
working-directory: tests/integration
run: |
npm ci
npx playwright install --with-deps chromium
- name: Install frontend dependencies
working-directory: frontend-modern
run: npm ci
- name: Build Pulse for testing
run: |
make build || go build -o pulse ./cmd/pulse
- name: Build Docker images for test environment
working-directory: tests/integration
run: |
# Build mock GitHub server
docker build -t pulse-mock-github:test ./mock-github-server
# Build Pulse test image
cd ../../
env:
PULSE_LICENSE_PUBLIC_KEY: ${{ secrets.PULSE_LICENSE_PUBLIC_KEY }}
- name: Run diagnostic smoke test
working-directory: tests/integration
env:
MOCK_CHECKSUM_ERROR: "false"
MOCK_NETWORK_ERROR: "false"
MOCK_RATE_LIMIT: "false"
MOCK_STALE_RELEASE: "false"
run: |
docker compose -f docker-compose.test.yml up -d --wait
npx playwright test tests/00-diagnostic.spec.ts --reporter=list,html
UPDATE_API_BASE_URL=http://localhost:7655 go test ../../tests/integration/api -run TestUpdateFlowIntegration -count=1
docker compose -f docker-compose.test.yml down -v
- name: Upload test results
if: always()
uses: actions/upload-artifact@v4
with:
name: playwright-report
path: tests/integration/playwright-report/
retention-days: 30
- name: Upload test videos and screenshots
if: failure()
uses: actions/upload-artifact@v4
with:
name: test-failures
path: |
tests/integration/test-results/
retention-days: 7
- name: Cleanup Docker resources
if: always()
working-directory: tests/integration
run: |
docker compose -f docker-compose.test.yml down -v || true
docker system prune -f || true
- name: Comment PR with test results
if: github.event_name == 'pull_request' && failure()
uses: actions/github-script@v7
with:
script: |
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: '❌ Update integration tests failed. Please check the [workflow run](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}) for details.'
})