docs: add aruaycodes as a contributor for code, and ideas #306
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
| # Run tests (e.g. build) on pull requests | |
| name: Tests | |
| on: | |
| pull_request: | |
| paths-ignore: | |
| - "apps/www/**" | |
| push: | |
| branches: | |
| - main | |
| paths-ignore: | |
| - "apps/www/**" | |
| workflow_dispatch: | |
| jobs: | |
| test-build: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| bun: ["1.3.2", "latest"] | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/cache@v5 | |
| with: | |
| path: ~/.bun/install/cache | |
| key: ${{ runner.os }}-${{ matrix.bun }}-bun-${{ hashFiles('**/bun.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-${{ matrix.bun }}-bun- | |
| - name: Setup Bun | |
| uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: ${{ matrix.bun }} | |
| - name: Install dependencies | |
| run: bun install | |
| - name: Build | |
| run: bun run build | |
| test: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| bun: ["1.3.2", "latest"] | |
| services: | |
| postgres: | |
| image: postgres:16 | |
| env: | |
| POSTGRES_USER: postgres | |
| POSTGRES_PASSWORD: postgres | |
| POSTGRES_DB: bedstack_test | |
| ports: | |
| - 5432:5432 | |
| options: >- | |
| --health-cmd pg_isready | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| env: | |
| NODE_ENV: test | |
| POSTGRES_HOST: localhost | |
| POSTGRES_PORT: 5432 | |
| POSTGRES_USER: postgres | |
| POSTGRES_PASSWORD: postgres | |
| POSTGRES_DB: bedstack_test | |
| DATABASE_URL: postgres://postgres:postgres@localhost:5432/bedstack_test | |
| JWT_SECRET: "test-secret" | |
| JWT_ALGORITHM: "HS256" | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/cache@v5 | |
| with: | |
| path: ~/.bun/install/cache | |
| key: ${{ runner.os }}-${{ matrix.bun }}-bun-${{ hashFiles('**/bun.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-${{ matrix.bun }}-bun- | |
| - name: Setup Bun | |
| uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: ${{ matrix.bun }} | |
| - name: Install dependencies | |
| run: bun install | |
| - name: Setup test database | |
| run: | | |
| # Run migrations | |
| bun run db:migrate | |
| - name: Wait for server | |
| run: | | |
| # Start server in background via turbo | |
| # We use --filter=conduit to only start the relevant app | |
| # We use --ui stream to avoid TUI in CI | |
| bun x turbo dev --filter=conduit --ui stream & | |
| timeout 30s bash -c 'until curl -s http://localhost:3000/api/health > /dev/null; do sleep 1; done' | |
| - name: Run API Tests | |
| run: bun run test:api | |
| - name: Run Unit Tests | |
| run: bun run test:unit | |
| test-typesafety: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| bun: ["1.3.2", "latest"] | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/cache@v5 | |
| with: | |
| path: ~/.bun/install/cache | |
| key: ${{ runner.os }}-${{ matrix.bun }}-bun-${{ hashFiles('**/bun.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-${{ matrix.bun }}-bun- | |
| - name: Setup Bun | |
| uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: ${{ matrix.bun }} | |
| - name: Install dependencies | |
| run: bun install | |
| - name: Run Type Safety Tests | |
| run: bun run typecheck |