diff --git a/.github/workflows/playwright.yml b/.github/workflows/playwright.yml index 6d3d8f5..79070cb 100644 --- a/.github/workflows/playwright.yml +++ b/.github/workflows/playwright.yml @@ -9,20 +9,33 @@ jobs: test: timeout-minutes: 60 runs-on: ubuntu-latest + environment: preview + env: + BASE_URL: ${{ vars.BASE_URL }} + JWT_ADMIN_EMAIL: ${{ secrets.JWT_ADMIN_EMAIL }} + JWT_EMAIL: ${{ secrets.JWT_EMAIL }} + JWT_SECRET: ${{ secrets.JWT_SECRET }} steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 - with: - node-version: lts/* - - name: Install dependencies - run: npm ci - - name: Install Playwright Browsers - run: npx playwright install --with-deps - - name: Run Playwright tests - run: npx playwright test - - uses: actions/upload-artifact@v4 - if: always() - with: - name: playwright-report - path: playwright-report/ - retention-days: 30 + - name: Output environment variables + run: | + echo "CI is $CI" + echo "BASE_URL is $BASE_URL" + echo "JWT_ADMIN_EMAIL is $(printf '%*s' ${#JWT_ADMIN_EMAIL} | tr ' ' '*')" + echo "JWT_EMAIL is $(printf '%*s' ${#JWT_EMAIL} | tr ' ' '*')" + echo "JWT_SECRET is $(printf '%*s' ${#JWT_SECRET} | tr ' ' '*')" + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: lts/* + - name: Install dependencies + run: npm ci + - name: Install Playwright Browsers + run: npx playwright install chromium --with-deps + - name: Run Playwright tests + run: npx playwright test + - uses: actions/upload-artifact@v4 + if: always() + with: + name: playwright-report + path: playwright-report/ + retention-days: 30