fix: Pad angle brackets in user uploaded json or text input to avoid html exception #9999
Workflow file for this run
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 | |
on: | |
pull_request: | |
branches: [develop, main, feature/*] | |
jobs: | |
cypress-run: | |
name: Cypress | |
runs-on: ubuntu-latest | |
services: | |
# Label used to access the service container | |
postgres: | |
# Docker Hub image | |
image: postgres@sha256:3d9ed832906091d609cfd6f283e79492ace01ba15866b21d8a262e8fd1cdfb55 | |
env: | |
POSTGRES_PASSWORD: postgres | |
# Set health checks to wait until postgres has started | |
options: >- | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
ports: | |
- 5432:5432 | |
redis: | |
# Docker Hub image | |
image: redis@sha256:4ca2a277f1dc3ddd0da33a258096de9a1cf5b9d9bd96b27ee78763ee2248c28c | |
options: >- | |
--health-cmd "redis-cli ping" | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
ports: | |
- 6379:6379 | |
env: | |
# Needed for Next Auth to initialize | |
NEXTAUTH_URL: http://localhost:3000 | |
TOKEN_SECRET: testKey | |
APP_ENV: test | |
REDIS_URL: localhost | |
DATABASE_URL: postgres://postgres:postgres@localhost:5432/formsDB | |
steps: | |
- name: Checkout | |
uses: actions/checkout@50fbc622fc4ef5163becd7fab6573eac35f8462e # v1.2.0 | |
- name: Node.JS 18 | |
uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3.8.1 | |
with: | |
node-version: 18 | |
- name: Get yarn cache directory path | |
id: yarn-cache-dir-path | |
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT | |
- uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2 | |
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) | |
with: | |
path: ${{ steps.yarn-cache-dir-path.outputs.dir }} | |
key: linux-yarn-${{ hashFiles('**/yarn.lock') }} | |
restore-keys: | | |
linux-yarn- | |
- name: "Install dependencies" | |
run: yarn install:all | |
- name: Cypress Tests | |
uses: cypress-io/github-action@d79d2d530a66e641eb4a5f227e13bc985c60b964 # v4.2.2 | |
with: | |
# we have already installed all dependencies above | |
install: false | |
browser: chrome | |
headed: false | |
build: yarn build:test | |
start: yarn start:test | |
wait-on: "http://localhost:3000" | |
config: baseUrl=http://localhost:3000 | |
- name: Cypress Component Tests | |
uses: cypress-io/github-action@d79d2d530a66e641eb4a5f227e13bc985c60b964 # v4.2.2 | |
with: | |
# we have already installed all dependencies above | |
install: false | |
browser: chrome | |
component: true | |
headed: false | |
- uses: actions/upload-artifact@3446296876d12d4e3a0f3145a3c87e67bf0a16b5 # tag=v1 | |
if: failure() | |
with: | |
name: cypress-screenshots | |
path: cypress/screenshots |