chore: increase dwd version, format with prettier #71
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
name: E2E Tests | |
permissions: | |
contents: write | |
packages: write | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
workflow_dispatch: | |
inputs: | |
debug_enabled: | |
type: boolean | |
description: "Run the build with tmate debugging enabled (https://github.com/marketplace/actions/debugging-with-tmate)" | |
required: false | |
default: false | |
jobs: | |
e2e-tests: | |
if: github.actor != 'renovate[bot]' | |
timeout-minutes: 60 | |
env: | |
CI: true | |
ESLINT_USE_FLAT_CONFIG: true | |
SUPABASE_URL: http://localhost:54321 | |
VITE_PORT: 5173 | |
VITE_BASE_URL: http://localhost:5173 | |
VITE_RECOVERY_AUTH_REDIRECT_URL: http://localhost:5173/profile/reset-password | |
VITE_SUPABASE_URL: http://localhost:54321 | |
TEST_SUPABASE_INBUCKET_URL: http://localhost:54324 | |
# The values below are taken from the command `supabase start` | |
# WARNING: Don't use production URLs or tokens here | |
SUPABASE_ANON_KEY: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZS1kZW1vIiwicm9sZSI6ImFub24iLCJleHAiOjE5ODM4MTI5OTZ9.CRXP1A7WOeoJeXxjNni43kdQwgnWNReilDMblYTn_I0 | |
VITE_SUPABASE_ANON_KEY: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZS1kZW1vIiwicm9sZSI6ImFub24iLCJleHAiOjE5ODM4MTI5OTZ9.CRXP1A7WOeoJeXxjNni43kdQwgnWNReilDMblYTn_I0 | |
SUPABASE_SERVICE_ROLE_KEY: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZS1kZW1vIiwicm9sZSI6InNlcnZpY2Vfcm9sZSIsImV4cCI6MTk4MzgxMjk5Nn0.EGIM96RAZx35lJzdJsyH-qQwv8Hdp7fsn3W0YpN81IU | |
VITE_MATOMO_SITE_ID: "" | |
VITE_MATOMO_URL: "" | |
VITE_MAP_BOUNDING_BOX: "13.0824446341071,52.3281202651866,13.7682544186827,52.681600197973" | |
VITE_MAP_CENTER_LNG: "13.388836926491992" | |
VITE_MAP_CENTER_LAT: "52.494590307846366" | |
VITE_MAPBOX_API_ENDPOINT: "https://api.mapbox.com" | |
VITE_MAP_PITCH_DEGREES: "45" | |
VITE_MAP_MAX_ZOOM_LEVEL: "20" | |
VITE_MAP_MIN_ZOOM_LEVEL: "10" | |
VITE_MAP_INITIAL_ZOOM_LEVEL: "11" | |
VITE_MAP_LOCATION_ZOOM_LEVEL: "17" | |
VITE_MAPBOX_API_KEY: ${{ secrets.VITE_MAPBOX_API_KEY }} | |
VITE_MAPBOX_STYLE_URL: ${{ secrets.VITE_MAPBOX_STYLE_URL }} | |
VITE_MAPBOX_TREES_TILESET_URL: ${{ secrets.VITE_MAPBOX_TREES_TILESET_URL }} | |
VITE_MAPBOX_TREES_TILESET_LAYER: ${{ secrets.VITE_MAPBOX_TREES_TILESET_LAYER }} | |
VITE_MAP_PUMPS_SOURCE_URL: ${{ secrets.VITE_MAP_PUMPS_SOURCE_URL }} | |
VITE_PW_TEST: "true" | |
SUPABASE_MAX_ROWS: 10000 | |
# Set to scheme, domain and possibly port (if something else than port 80) of the origin you are expecting | |
# https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Allow-Origin | |
ACCESS_CONTROL_ALLOW_ORIGIN: "*" | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code ⬇️ | |
uses: actions/checkout@v4 | |
- name: Setup Node.js using .nvmrc ⚙️ | |
uses: actions/setup-node@v4 | |
with: | |
node-version-file: ".nvmrc" | |
cache: npm | |
- name: Setup tmate session so you can ssh into the workflow machine ⚙️ | |
uses: mxschmitt/action-tmate@v3 | |
if: ${{ github.event_name == 'workflow_dispatch' && inputs.debug_enabled }} | |
with: | |
limit-access-to-actor: true | |
# please see https://github.com/mxschmitt/action-tmate | |
- name: Cache npm dependencies 💾 | |
id: cache-npm-deps | |
uses: actions/cache@v4 | |
with: | |
path: | | |
**/node_modules | |
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-node- | |
- name: Install dependencies 📦 | |
if: steps.cache-npm-deps.outputs.cache-hit != 'true' | |
run: npm ci | |
- name: Check Build 🏗️ | |
run: npm run build | |
- name: Get the source for the api ⬇️ | |
id: checkout-api | |
uses: actions/checkout@v4 | |
with: | |
repository: technologiestiftung/giessdenkiez-de-postgres-api | |
ref: "staging" | |
path: api | |
- name: Install Supabase CLI ⚙️ | |
uses: supabase/setup-cli@v1 | |
with: | |
version: 1.178.2 | |
- name: Start supabase ⚡️ | |
run: | | |
cd api | |
npm ci | |
supabase start | |
- name: Install Playwright Browsers 🧭 | |
run: npx playwright install --with-deps | |
- name: Run E2E test 🎭 | |
run: npm run test:e2e | |
- name: Upload E2E test results ⬆️ | |
uses: actions/upload-artifact@v4 | |
if: ${{ failure() && !cancelled() }} | |
with: | |
name: playwright-e2e-test-results | |
path: tests/e2e/test-results | |
retention-days: 30 | |
- name: Start Tmate session 🔌 | |
if: ${{ failure() && !cancelled() }} | |
uses: mxschmitt/action-tmate@v3 | |
timeout-minutes: 15 | |
with: | |
limit-access-to-actor: true |