-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
89 additions
and
22 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
name: Run e2e tests | ||
|
||
on: | ||
push: | ||
branches: | ||
- 'test-ci' | ||
pull_request: | ||
branches: | ||
- 'test-ci' | ||
|
||
env: | ||
MAILER_SECRET: E2E | ||
AUTH_SECRET: E2E | ||
|
||
jobs: | ||
e2e: | ||
runs-on: ubuntu-latest | ||
if: always() | ||
services: | ||
smtp: | ||
image: "inbucket/inbucket" | ||
ports: | ||
- 1025:2500 | ||
- 8025:9000 | ||
db: | ||
image: "postgres:12" | ||
env: | ||
POSTGRES_HOST_AUTH_METHOD: trust | ||
POSTGRES_DB: codex_test | ||
options: >- | ||
--health-cmd pg_isready | ||
--health-interval 10s | ||
--health-timeout 5s | ||
--health-retries 5 | ||
ports: | ||
- 5432:5432 | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
node-version: [ 20.x ] | ||
shardIndex: [ 1, 2 ] | ||
shardTotal: [ 2 ] | ||
name: Run e2e tests on Node ${{ matrix.node-version }} | ||
env: | ||
DATABASE_URL: postgres://postgres@localhost/codex_test_${{ matrix.shardIndex}} | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
- name: Setup node | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
cache: 'yarn' | ||
- name: Install dependencies | ||
run: yarn install --frozen-lockfile | ||
- name: Run database migrations | ||
run: npx prisma migrate reset --force | ||
- name: Run e2e tests | ||
run: yarn test:e2e --shard=${{ matrix.shardIndex }}/${{ matrix.shardTotal }} | ||
- name: Upload test report | ||
uses: actions/upload-artifact@v4 | ||
if: always() | ||
with: | ||
name: blob-report-${{ matrix.shardIndex }} | ||
path: blob-report/ | ||
retention-days: 1 |
This file contains 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
This file contains 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