Skip to content

Update e2e-tests.yml #6

Update e2e-tests.yml

Update e2e-tests.yml #6

Workflow file for this run

name: 'e2e tests'
on: push
# workflow_dispatch:
# pull_request:
# types:
# - ready_for_review
# paths:
# - 'front-end/**'
# - 'e2e/**'
jobs:
e2e-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18.12.x
cache: npm
cache-dependency-path: '**/package-lock.json'
- uses: actions/setup-python@v5
with:
python-version: '3.11'
cache: 'pip'
- run: pip install -r requirements.txt
- run: npm install -g bower
- run: bower install
working-directory: ./front-end
- name: Install build dependencies
run: npm ci
working-directory: ./front-end
- name: Build
run: npm run build
working-directory: ./front-end
- name: Build
id: build
working-directory: ./front-end/build
run: |
cd `ls | head`
BUILD_DIR="`pwd`"
echo BUILD_DIR="$BUILD_DIR" >> $GITHUB_OUTPUT
- uses: browser-actions/setup-chrome@v1
- name: Install test dependencies
run: npm ci
working-directory: ./e2e
- name: Run e2e tests
working-directory: ./e2e
env:
BROWSER_LIST: chrome
CHALKIT_DIR: ${{ steps.build.outputs.BUILD_DIR }}
run: |
echo CHALKIT_DIR="$CHALKIT_DIR"
echo BROWSER_LIST="chrome"
npm run test
- name: Upload test outputs
uses: actions/upload-artifact@v4
if: always()
with:
name: e2e-test-outputs
path: e2e/outputs
retention-days: 5
if-no-files-found: error
- name: Upload test report
uses: actions/upload-artifact@v4
if: always()
with:
name: e2e-test-report
path: e2e/mochawesome-report
retention-days: 5
if-no-files-found: error