Update stage/prod configs (#207) #429
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
--- | |
name: e2e-tests | |
concurrency: | |
group: e2e-tests | |
cancel-in-progress: true | |
on: | |
push: | |
branches: | |
- "**" | |
- "!main" | |
permissions: | |
contents: read | |
jobs: | |
detect-changes: | |
runs-on: ubuntu-latest | |
env: | |
IS_CI_AUTOMATION: "yes" | |
outputs: | |
backend-changed: ${{ steps.check.outputs.backend-changed }} | |
iac-changed: ${{ steps.check.outputs.iac-changed }} | |
frontend-changed: ${{ steps.check.outputs.frontend-changed }} | |
shared-changed: ${{ steps.check.outputs.shared-changed }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: "22" | |
- uses: dorny/paths-filter@v3 | |
id: check | |
with: | |
filters: | | |
backend-changed: | |
- 'packages/send/backend/**' | |
iac-changed: | |
- 'packages/send/pulumi/**' | |
- '.github/workflows/validate.yml' | |
frontend-changed: | |
- 'packages/send/frontend/**' | |
shared-changed: | |
- 'packages/shared/**' | |
end-to-end-tests: | |
needs: detect-changes | |
if: needs.detect-changes.outputs.backend-changed == 'true' || needs.detect-changes.outputs.frontend-changed == 'true' | |
runs-on: ubuntu-latest | |
env: | |
IS_CI_AUTOMATION: "yes" | |
strategy: | |
matrix: | |
node-version: ["22"] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Set up environments and install dependencies | |
id: setup-and-install-dependencies | |
shell: bash | |
run: | | |
npm install -g pnpm | |
npm install -g bun | |
pnpm install --filter @thunderbird/tbpro-add-on && lerna run bootstrap | |
pnpm i --filter "send-*" | |
pnpm install --filter tbpro-shared | |
cd packages/send | |
# Setup local environment (use public login) | |
echo Y | pnpm setup:local | |
- name: Add env vars for backend | |
shell: bash | |
run: | | |
cd packages/send/backend | |
echo "OIDC_CLIENT_ID=${{ secrets.OIDC_CLIENT_ID }}" >> .env | |
echo "OIDC_CLIENT_SECRET=${{ secrets.OIDC_CLIENT_SECRET }}" >> .env | |
echo "OIDC_TOKEN_INTROSPECTION_URL=${{ secrets.OIDC_TOKEN_INTROSPECTION_URL }}" >> .env | |
- name: Add env vars for frontend | |
shell: bash | |
run: | | |
cd packages/send/frontend | |
echo "VITE_OIDC_CLIENT_ID=${{ secrets.VITE_OIDC_CLIENT_ID }}" >> .env | |
echo "VITE_OIDC_ROOT_URL=${{ secrets.VITE_OIDC_ROOT_URL }}" >> .env | |
- name: Run stack and test | |
id: run-stack-and-test | |
timeout-minutes: 10 | |
shell: bash | |
run: | | |
# Create .env file with secrets (for end to end run only)# Create .env file with secrets | |
echo "TBPRO_USERNAME=${{ secrets.TBPRO_USERNAME }}" > .env | |
echo "TBPRO_PASSWORD=${{ secrets.TBPRO_PASSWORD }}" >> .env | |
mv .env packages/send/e2e | |
lerna run build-image:backend --scope=send-suite | |
pnpm run test:e2e:ci | |
- uses: actions/upload-artifact@v4 | |
if: ${{ !cancelled() }} | |
with: | |
name: playwright-report | |
path: packages/send/playwright-report/ | |
retention-days: 30 |