-
Notifications
You must be signed in to change notification settings - Fork 513
Customizable ports #962
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Customizable ports #962
Changes from all commits
afae79b
8a76453
4433317
915252d
f4e3b9a
eb5662c
a20ccaa
8e880cc
4caefb1
0550e2f
60410a3
f441c50
2c04b0a
abdad07
faf2157
184e9e6
d6ed716
7c4c8ba
8400777
5c2a55c
51860cc
3774341
14eafbb
f1d479a
30f5592
52c398d
7ccc830
cab12f0
434d1bf
c796ebf
0f5c776
7c699a5
8e4574e
f42efeb
75c2595
76ef55f
ba0ec30
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,150 @@ | ||
| name: Runs E2E API Tests with custom port prefix | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - main | ||
| - dev | ||
| pull_request: | ||
|
|
||
| concurrency: | ||
| group: ${{ github.workflow }}-${{ github.ref }} | ||
| cancel-in-progress: ${{ github.ref != 'refs/heads/main' && github.ref != 'refs/heads/dev' }} | ||
|
|
||
| jobs: | ||
| build: | ||
| runs-on: ubicloud-standard-8 | ||
| env: | ||
| NODE_ENV: test | ||
| STACK_ENABLE_HARDCODED_PASSKEY_CHALLENGE_FOR_TESTING: yes | ||
| STACK_DIRECT_DATABASE_CONNECTION_STRING: "postgres://postgres:PASSWORD-PLACEHOLDER--uqfEC1hmmv@localhost:6728/stackframe" | ||
| NEXT_PUBLIC_STACK_PORT_PREFIX: "67" | ||
|
|
||
| strategy: | ||
| matrix: | ||
| node-version: [22.x] | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v3 | ||
|
|
||
| - name: Setup Node.js ${{ matrix.node-version }} | ||
| uses: actions/setup-node@v3 | ||
| with: | ||
| node-version: ${{ matrix.node-version }} | ||
|
|
||
| - name: Setup pnpm | ||
| uses: pnpm/action-setup@v3 | ||
| with: | ||
| version: 9.1.2 | ||
|
|
||
| # Even just starting the Docker Compose as a daemon is slow because we have to download and build the images | ||
| # so, we run it in the background | ||
| - name: Start Docker Compose in background | ||
| uses: JarvusInnovations/background-action@v1.0.7 | ||
| with: | ||
| run: docker compose -f docker/dependencies/docker.compose.yaml up -d & | ||
| # we don't need to wait on anything, just need to start the daemon | ||
| wait-on: /dev/null | ||
| tail: true | ||
| wait-for: 3s | ||
| log-output-if: true | ||
|
|
||
| - name: Install dependencies | ||
| run: pnpm install --frozen-lockfile | ||
|
|
||
| - name: Create .env.test.local file for apps/backend | ||
| run: cp apps/backend/.env.development apps/backend/.env.test.local | ||
|
|
||
| - name: Create .env.test.local file for apps/dashboard | ||
| run: cp apps/dashboard/.env.development apps/dashboard/.env.test.local | ||
|
|
||
| - name: Create .env.test.local file for apps/e2e | ||
| run: cp apps/e2e/.env.development apps/e2e/.env.test.local | ||
|
|
||
| - name: Create .env.test.local file for docs | ||
| run: cp docs/.env.development docs/.env.test.local | ||
|
|
||
| - name: Create .env.test.local file for examples/cjs-test | ||
| run: cp examples/cjs-test/.env.development examples/cjs-test/.env.test.local | ||
|
|
||
| - name: Create .env.test.local file for examples/demo | ||
| run: cp examples/demo/.env.development examples/demo/.env.test.local | ||
|
|
||
| - name: Create .env.test.local file for examples/docs-examples | ||
| run: cp examples/docs-examples/.env.development examples/docs-examples/.env.test.local | ||
|
|
||
| - name: Create .env.test.local file for examples/e-commerce | ||
| run: cp examples/e-commerce/.env.development examples/e-commerce/.env.test.local | ||
|
|
||
| - name: Create .env.test.local file for examples/middleware | ||
| run: cp examples/middleware/.env.development examples/middleware/.env.test.local | ||
|
|
||
| - name: Create .env.test.local file for examples/supabase | ||
| run: cp examples/supabase/.env.development examples/supabase/.env.test.local | ||
|
|
||
| - name: Create .env.test.local file for examples/convex | ||
| run: cp examples/convex/.env.development examples/convex/.env.test.local | ||
|
|
||
| - name: Build | ||
| run: pnpm build | ||
|
|
||
| - name: Wait on Postgres | ||
| run: pnpm run wait-until-postgres-is-ready:pg_isready | ||
|
|
||
| - name: Wait on Inbucket | ||
| run: npx wait-on tcp:localhost:6729 | ||
|
|
||
| - name: Wait on Svix | ||
| run: npx wait-on tcp:localhost:6713 | ||
|
|
||
| - name: Initialize database | ||
| run: pnpm run db:init | ||
|
|
||
| - name: Start stack-backend in background | ||
| uses: JarvusInnovations/background-action@v1.0.7 | ||
| with: | ||
| run: pnpm run start:backend --log-order=stream & | ||
| wait-on: | | ||
| http://localhost:6702 | ||
| tail: true | ||
| wait-for: 30s | ||
| log-output-if: true | ||
| - name: Start stack-dashboard in background | ||
| uses: JarvusInnovations/background-action@v1.0.7 | ||
| with: | ||
| run: pnpm run start:dashboard --log-order=stream & | ||
| wait-on: | | ||
| http://localhost:6702 | ||
| tail: true | ||
| wait-for: 30s | ||
| log-output-if: true | ||
| - name: Start mock-oauth-server in background | ||
| uses: JarvusInnovations/background-action@v1.0.7 | ||
| with: | ||
| run: pnpm run start:mock-oauth-server --log-order=stream & | ||
| wait-on: | | ||
| http://localhost:6702 | ||
| tail: true | ||
| wait-for: 30s | ||
| log-output-if: true | ||
|
|
||
| - name: Wait 10 seconds | ||
| run: sleep 10 | ||
|
|
||
| - name: Run tests | ||
| run: pnpm test | ||
|
|
||
| - name: Run tests again, to make sure they are stable (attempt 1) | ||
| if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev' | ||
| run: pnpm test | ||
|
|
||
| - name: Run tests again, to make sure they are stable (attempt 2) | ||
| if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev' | ||
| run: pnpm test | ||
|
|
||
| - name: Verify data integrity | ||
| run: pnpm run verify-data-integrity | ||
|
|
||
| - name: Print Docker Compose logs | ||
| if: always() | ||
| run: docker compose -f docker/dependencies/docker.compose.yaml logs | ||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,47 @@ | ||||||||||||||||||||||||||||||||||||||||||||||
| name: "Dev Environment Test With Custom Base Port" | ||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||
| on: | ||||||||||||||||||||||||||||||||||||||||||||||
| push: | ||||||||||||||||||||||||||||||||||||||||||||||
| branches: | ||||||||||||||||||||||||||||||||||||||||||||||
| - main | ||||||||||||||||||||||||||||||||||||||||||||||
| - dev | ||||||||||||||||||||||||||||||||||||||||||||||
| pull_request: | ||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||
| concurrency: | ||||||||||||||||||||||||||||||||||||||||||||||
| group: ${{ github.workflow }}-${{ github.ref }} | ||||||||||||||||||||||||||||||||||||||||||||||
| cancel-in-progress: ${{ github.ref != 'refs/heads/main' && github.ref != 'refs/heads/dev' }} | ||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||
| env: | ||||||||||||||||||||||||||||||||||||||||||||||
| SHELL: /usr/bin/bash | ||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||
| jobs: | ||||||||||||||||||||||||||||||||||||||||||||||
| restart-dev-and-test-with-custom-base-port: | ||||||||||||||||||||||||||||||||||||||||||||||
| runs-on: ubicloud-standard-8 | ||||||||||||||||||||||||||||||||||||||||||||||
| env: | ||||||||||||||||||||||||||||||||||||||||||||||
| NEXT_PUBLIC_STACK_PORT_PREFIX: "69" | ||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||
| steps: | ||||||||||||||||||||||||||||||||||||||||||||||
| - uses: actions/checkout@v3 | ||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||
| - name: Setup Node.js v20 | ||||||||||||||||||||||||||||||||||||||||||||||
| uses: actions/setup-node@v3 | ||||||||||||||||||||||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||||||||||||||||||||||
| node-version: 20 | ||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||
| - name: Setup pnpm | ||||||||||||||||||||||||||||||||||||||||||||||
| uses: pnpm/action-setup@v3 | ||||||||||||||||||||||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||||||||||||||||||||||
| version: 9.1.2 | ||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+24
to
+34
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion | 🟠 Major Bump core actions to v4. actions/checkout and actions/setup-node v3 are outdated and may be flagged by linters. Upgrade to v4. - - uses: actions/checkout@v3
+ - uses: actions/checkout@v4
...
- uses: actions/setup-node@v3
+ uses: actions/setup-node@v4📝 Committable suggestion
Suggested change
🧰 Tools🪛 actionlint (1.7.8)25-25: the runner of "actions/checkout@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue (action) 28-28: the runner of "actions/setup-node@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue (action) 🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||
| - name: Install packages | ||||||||||||||||||||||||||||||||||||||||||||||
| run: pnpm install | ||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||
| - name: Start dev environment | ||||||||||||||||||||||||||||||||||||||||||||||
| run: pnpm run restart-dev-environment | ||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||
| - name: Run tests | ||||||||||||||||||||||||||||||||||||||||||||||
| run: pnpm run test --reporter=verbose | ||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||
| - name: Print dev server logs | ||||||||||||||||||||||||||||||||||||||||||||||
| run: cat dev-server.log.untracked.txt | ||||||||||||||||||||||||||||||||||||||||||||||
| if: always() | ||||||||||||||||||||||||||||||||||||||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,7 @@ | ||
| *.untracked | ||
| *.untracked.* | ||
| node-compile-cache/ | ||
| .envrc | ||
|
|
||
|
|
||
| *.cpuprofile | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.