Skip to content

test: updated tests #52

test: updated tests

test: updated tests #52

Workflow file for this run

name: End to End Tests
on: [push, pull_request]
env:
NODE_VERSION: 20
NEXTAUTH_SECRET: ${{ secrets.NEXTAUTH_SECRET }}
NEXTAUTH_URL: ${{ secrets.NEXTAUTH_URL }}
jobs:
install:
runs-on: ubuntu-latest
container:
image: cypress/browsers:node-18.16.0-chrome-114.0.5735.133-1-ff-114.0.2-edge-114.0.1823.51-1
options: --user 1001
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: 8
- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- name: Setup pnpm cache
uses: actions/cache@v4
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Use Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_VERSION }}
cache: 'pnpm'
- name: Install dependencies
run: pnpm install
- name: Install cypress
run: pnpm exec cypress install
- name: Cypress install
uses: cypress-io/github-action@v6
with:
runTests: false
# report machine parameters
- run: pnpm cypress info
- run: node --version
- run: pnpm build
- name: Save build folder
uses: actions/upload-artifact@v3
with:
name: build
if-no-files-found: error
path: .next
ui-chrome-tests:
timeout-minutes: 15
runs-on: ubuntu-latest
container:
image: cypress/browsers:node-18.16.0-chrome-114.0.5735.133-1-ff-114.0.2-edge-114.0.1823.51-1
options: --user 1001
needs: install
strategy:
fail-fast: false
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: 8
- name: Use Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_VERSION }}
cache: 'pnpm'
- name: Download the build folders
uses: actions/download-artifact@v3
with:
name: build
path: .next
- name: Node info
run: node -v
- name: __e Dir
run: ls /__e
- name: "UI Tests - Chrome"
uses: cypress-io/github-action@v6
with:
build: pnpm cypress info
start: pnpm start
wait-on: "http://localhost:3000"
wait-on-timeout: 120
browser: chrome
- name: Save screenshots
uses: actions/upload-artifact@v3
with:
name: screenshots
path: cypress/screenshots
ui-chrome-mobile-tests:
timeout-minutes: 15
runs-on: ubuntu-latest
container:
image: cypress/browsers:node-18.16.0-chrome-114.0.5735.133-1-ff-114.0.2-edge-114.0.1823.51-1
options: --user 1001
needs: install
strategy:
fail-fast: false
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: 8
- name: Use Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_VERSION }}
cache: 'pnpm'
- name: Download the build folders
uses: actions/download-artifact@v3
with:
name: build
path: .next
- name: "UI Tests - Chrome - Mobile"
uses: cypress-io/github-action@v6
with:
config: '{"e2e":{"viewportWidth":375,"viewportHeight":667}}'
start: pnpm start
wait-on: "http://localhost:3000"
wait-on-timeout: 120
browser: chrome
- name: Save screenshots
uses: actions/upload-artifact@v3
with:
name: screenshots
path: cypress/screenshots
ui-firefox-tests:
timeout-minutes: 15
runs-on: ubuntu-latest
container:
image: cypress/browsers:node-18.16.0-chrome-114.0.5735.133-1-ff-114.0.2-edge-114.0.1823.51-1
options: --user 1001
needs: install
strategy:
fail-fast: false
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: 8
- name: Use Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_VERSION }}
cache: 'pnpm'
- name: Download the build folders
uses: actions/download-artifact@v3
with:
name: build
path: .next
- name: "UI Tests - Firefox"
uses: cypress-io/github-action@v6
with:
start: pnpm start
wait-on: "http://localhost:3000"
wait-on-timeout: 120
browser: firefox
- name: Save screenshots
uses: actions/upload-artifact@v3
with:
name: screenshots
path: cypress/screenshots
ui-firefox-mobile-tests:
timeout-minutes: 15
runs-on: ubuntu-latest
container:
image: cypress/browsers:node-18.16.0-chrome-114.0.5735.133-1-ff-114.0.2-edge-114.0.1823.51-1
options: --user 1001
needs: install
strategy:
fail-fast: false
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: 8
- name: Use Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_VERSION }}
cache: 'pnpm'
- name: Download the build folders
uses: actions/download-artifact@v3
with:
name: build
path: .next
- name: "UI Tests - Firefox - Mobile"
uses: cypress-io/github-action@v6
with:
config: '{"e2e":{"viewportWidth":375,"viewportHeight":667}}'
start: pnpm start
wait-on: "http://localhost:3000"
wait-on-timeout: 120
browser: firefox
- name: Save screenshots
uses: actions/upload-artifact@v3
with:
name: screenshots
path: cypress/screenshots