fix(ci): release workflow #51
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: Test | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| concurrency: | |
| group: test-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| unit: | |
| runs-on: blacksmith-4vcpu-ubuntu-2404 | |
| timeout-minutes: 15 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| - uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: 1.3.14 | |
| - run: bun install --frozen-lockfile | |
| - run: bun run test -- --filter=!@buzzkit/marketing | |
| - run: NODE_OPTIONS=--no-warnings bunx vitest run test/actor test/engine test/api test/libs test/queue test/utils test/providers test/packages | |
| working-directory: apps/api | |
| - run: bun run test:e2e | |
| working-directory: apps/ping | |
| marketing: | |
| runs-on: blacksmith-4vcpu-ubuntu-2404 | |
| timeout-minutes: 15 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| - uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: 1.3.14 | |
| - run: bun install --frozen-lockfile | |
| - run: bun run test | |
| working-directory: apps/marketing | |
| integration: | |
| runs-on: blacksmith-8vcpu-ubuntu-2404 | |
| timeout-minutes: 30 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| - uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: 1.3.14 | |
| - run: bun install --frozen-lockfile | |
| - run: docker compose up -d postgres tinybird --wait --wait-timeout 180 | |
| - run: bun db:push | |
| working-directory: packages/database | |
| env: | |
| DATABASE_URL: postgresql://postgres:postgres@localhost:5460/buzzkit | |
| - name: Push Tinybird definitions | |
| working-directory: packages/tinybird | |
| run: | | |
| for attempt in 1 2 3 4 5 6; do | |
| bun run push && exit 0 | |
| echo "Tinybird Local not ready yet (attempt $attempt), retrying in 10s" | |
| sleep 10 | |
| done | |
| exit 1 | |
| - name: Write test secrets | |
| run: | | |
| cat > apps/api/.dev.vars <<VARS | |
| ENVIRONMENT=development | |
| TINYBIRD_URL=http://localhost:7181 | |
| BETTER_AUTH_URL=http://localhost:8791/v1/auth | |
| BETTER_AUTH_SECRET=$(openssl rand -base64 32) | |
| CREDENTIAL_MASTER_KEY_V1=$(openssl rand -base64 32) | |
| SQIDS_ALPHABET=$(node -e "console.log([...'0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'].sort(() => Math.random() - 0.5).join(''))") | |
| DASHBOARD_URL=http://localhost:5180 | |
| GITHUB_CLIENT_ID= | |
| GITHUB_CLIENT_SECRET= | |
| AXIOM_API_TOKEN= | |
| AXIOM_LOGS_DATASET= | |
| AXIOM_TRACES_DATASET= | |
| OTEL_EXPORTER_OTLP_ENDPOINT= | |
| VARS | |
| - run: bun run test | |
| working-directory: apps/api |