Skip to content

Subindo o curso de QGIS no blog #103

Subindo o curso de QGIS no blog

Subindo o curso de QGIS no blog #103

Workflow file for this run

name: Cypress Tests
on:
pull_request:
branches:
- main
paths:
- "next/**/*"
- ".github/workflows/cypress-tests.yaml"
jobs:
cypress-run:
name: Cypress E2E Tests
if: github.base_ref == 'main' && github.head_ref == 'staging'
runs-on: ubuntu-latest
environment: staging
env:
NEXT_PUBLIC_API_URL: ${{ vars.NEXT_PUBLIC_API_URL }}
NEXT_PUBLIC_SITE_NAME: ${{ vars.NEXT_PUBLIC_SITE_NAME }}
NEXT_PUBLIC_KEY_STRIPE: ${{ secrets.NEXT_PUBLIC_KEY_STRIPE }}
NEXT_PUBLIC_BASE_URL_FRONTEND: ${{ vars.NEXT_PUBLIC_BASE_URL_FRONTEND }}
NODE_ENV: ${{ vars.NODE_ENV }}
IMAGE_NAME: ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}:staging
CRYPRESS_AUTH_EMAIL: ${{ secrets.CRYPRESS_AUTH_EMAIL }}
CRYPRESS_AUTH_PASSWORD: ${{ secrets.CRYPRESS_AUTH_PASSWORD }}
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 18
cache: 'npm'
cache-dependency-path: 'next/package-lock.json'
- name: Install dependencies
working-directory: ./next
run: npm ci
- name: Run Cypress tests against Staging
uses: cypress-io/github-action@v5
with:
working-directory: ./next
browser: chrome
config-file: cypress.config.js
config: baseUrl=${{ vars.NEXT_PUBLIC_BASE_URL_FRONTEND }}