-
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
47 changed files
with
1,199 additions
and
287 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,103 @@ | ||
name: e2e.web | ||
on: | ||
workflow_call: | ||
|
||
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#concurrency | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} | ||
|
||
jobs: | ||
e2e: | ||
timeout-minutes: 10 | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
working-directory: web | ||
env: | ||
CI: true | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Node | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
cache: "npm" | ||
|
||
cache-dependency-path: "web/package-lock.json" | ||
|
||
- name: Setup Java | ||
uses: actions/setup-java@v4 | ||
with: | ||
distribution: "temurin" | ||
java-version: "21" | ||
|
||
# As described on https://nextjs.org/docs/pages/building-your-application/deploying/ci-build-caching#github-actions | ||
- name: Cache | ||
uses: actions/cache@v4 | ||
with: | ||
path: | | ||
~/.npm | ||
${{ github.workspace }}/.next/cache | ||
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}-${{ hashFiles('**/*.js', '**/*.jsx', '**/*.ts', '**/*.tsx') }} | ||
restore-keys: | | ||
${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}- | ||
- name: Generate API Client from OpenAPI | ||
run: npm run openapi | ||
|
||
- name: Install dependencies | ||
run: npm ci | ||
|
||
- name: Build | ||
run: npm run build | ||
|
||
# Cache Playwright browsers | ||
# https://github.com/microsoft/playwright/issues/7249#issuecomment-1154603556 | ||
- name: Get Playwright version | ||
id: playwright-version | ||
run: echo "PLAYWRIGHT_VERSION=$(node -e "console.log(require('./package.json').devDependencies['@playwright/test'])")" >> $GITHUB_ENV | ||
|
||
- uses: actions/cache@v4 | ||
id: playwright-cache | ||
with: | ||
path: "~/.cache/ms-playwright" | ||
key: "${{ runner.os }}-playwright-${{ steps.playwright-version.outputs.version }}" | ||
restore-keys: | | ||
${{ runner.os }}-playwright- | ||
# If the Playwright browser binaries weren't able to be restored, we tell | ||
# paywright to install everything for us. | ||
- name: Install Playwright's dependencies | ||
if: steps.playwright-cache.outputs.cache-hit != 'true' | ||
run: npx playwright install --with-deps | ||
|
||
- name: Run server | ||
run: npm run e2e:server | ||
|
||
- uses: emilioschepis/wait-for-endpoint@v1.0.3 | ||
with: | ||
url: http://localhost:8080/health | ||
method: GET | ||
expected-status: 200 | ||
timeout: 30000 | ||
interval: 250 | ||
|
||
- name: Run tests | ||
run: npm run e2e | ||
|
||
- name: Upload test artifacts | ||
uses: actions/upload-artifact@v4 | ||
if: always() | ||
with: | ||
name: playwright-report | ||
path: web/playwright-report/ | ||
retention-days: 15 | ||
|
||
- name: Print docker logs | ||
run: | | ||
cd ../server | ||
docker compose logs || true | ||
if: always() |
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 |
---|---|---|
@@ -1,25 +1,14 @@ | ||
name: main.server | ||
|
||
on: | ||
push: | ||
paths: | ||
- 'server/**' | ||
- '.github/workflows/*.server.yml' | ||
- "server/**" | ||
- "!server/*.md" | ||
- ".github/workflows/*.server.yml" | ||
branches: | ||
- main | ||
|
||
jobs: | ||
ci: | ||
uses: ./.github/workflows/ci.server.yml | ||
|
||
# tag: | ||
# uses: ./.github/workflows/tag.yml | ||
# needs: ci | ||
# permissions: | ||
# id-token: write | ||
# contents: read | ||
# secrets: | ||
# PAT: ${{ secrets.PAT }} | ||
# AWS_ECR_ROLE: ${{ secrets.AWS_ECR_ROLE }} | ||
# AWS_REGION: ${{ secrets.AWS_REGION }} | ||
# AWS_ECR_REGISTRY: ${{ secrets.AWS_ECR_REGISTRY }} | ||
# AWS_ECR_REPOSITORY: ${{ secrets.AWS_ECR_REPOSITORY }} |
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,17 @@ | ||
name: main.web | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- "web/**" | ||
- "!web/*.md" | ||
- ".github/workflows/*.web.yml" | ||
|
||
jobs: | ||
ci: | ||
uses: ./.github/workflows/ci.web.yml | ||
|
||
e2e: | ||
uses: ./.github/workflows/e2e.web.yml |
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,14 @@ | ||
# Ran only when a pull request against main is opened | ||
name: pr.e2e.web | ||
|
||
on: | ||
pull_request: | ||
branches: [main] | ||
paths: | ||
- "web/**" | ||
- "!web/*.md" | ||
- ".github/workflows/*.web.yml" | ||
|
||
jobs: | ||
ci: | ||
uses: ./.github/workflows/e2e.web.yml |
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,14 @@ | ||
name: pr.web | ||
|
||
on: | ||
push: | ||
branches-ignore: | ||
- main | ||
paths: | ||
- "web/**" | ||
- "!web/*.md" | ||
- ".github/workflows/*.web.yml" | ||
|
||
jobs: | ||
ci: | ||
uses: ./.github/workflows/ci.web.yml |
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 |
---|---|---|
|
@@ -5,3 +5,4 @@ bin | |
.env.secrets | ||
terraform/*.tfstate | ||
terraform/*.tfstate.backup | ||
.vscode |
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
Oops, something went wrong.