Skip to content

feat(ContainerTool): Support both Podman and Docker as container tool for setup-script #1452

feat(ContainerTool): Support both Podman and Docker as container tool for setup-script

feat(ContainerTool): Support both Podman and Docker as container tool for setup-script #1452

name: Cypress tests on pr
on:
pull_request:
branches: [ main ]
types: [opened, synchronize, reopened]
paths:
- 'frontend/**'
- '!frontend/stats/**'
- 'backend/**'
- '.github/workflows/run-cypress-on-pr.yaml'
- 'compose.yaml'
- 'Dockerfile'
- 'gitea/**'
- 'package.json'
- 'development/**'
workflow_dispatch:
jobs:
cypress-tests:
name: Build environment and run e2e test
timeout-minutes: 25
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- name: Generate .env file
run: |
echo CYPRESS_TEST_APP=autodeploy-v3 >> .env
echo DEVELOP_APP_DEVELOPMENT=0 >> .env
echo DEVELOP_RESOURCE_ADMIN=0 >> .env
echo DEVELOP_BACKEND=0 >> .env
echo DEVELOP_DASHBOARD=0 >> .env
echo DEVELOP_PREVIEW=0 >> .env
echo GITEA_ADMIN_PASS=g9wDIG@6gf >> .env
echo GITEA_ADMIN_USER=localg1iteaadmin >> .env
echo GITEA_CYPRESS_USER=cypress_testuser >> .env
echo GITEA_CYPRESS_PASS=g9wDIG@6gf >> .env
echo GITEA_ORG_USER=ttd >> .env
echo POSTGRES_PASSWORD=kyeDIG@eip >> .env
echo COMMIT= >> .env
echo IGNORE_DOCKER_DNS_LOOKUP=true >> .env
echo CONTAINER_MANAGER_TOOL=docker >> .env
- name: Install node
uses: actions/setup-node@v4
with:
cache: 'yarn'
- name: Run setup.js script
run: |
node ./development/setup.js
- name: Cypress run
uses: cypress-io/github-action@v5
with:
install: true
working-directory: frontend/testing/cypress
env: environment=local
spec: src/integration/**/*.js
record: true
parallel: false
- name: Store artifacts
uses: actions/upload-artifact@v4
if: failure()
with:
name: cypress-screenshots
path: frontend/testing/cypress/screenshots
- name: Stop compose file
if: always()
run: docker-compose down