Skip to content

3911 // Fix cypress tests in ci #2515

3911 // Fix cypress tests in ci

3911 // Fix cypress tests in ci #2515

Workflow file for this run

name: Review
on: [pull_request]
jobs:
test-and-build:
runs-on: it
steps:
- run: docker run --rm --volume $PWD:/videos:rw bash chown -R $UID /videos
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-node@v3
with:
cache: 'yarn'
- name: Prune containers
run: |
docker system prune -af
- name: install dependencies πŸš€
run: |
yarn install --frozen-lockfile # optional, --immutable
# - name: linting ✨
# run: |
# yarn lint
# - name: style πŸ’…
# run: |
# yarn style
# - name: running test πŸ›«πŸ›¬
# run: |
# yarn test --coverage src
# - name: upload coverage to Codecov πŸ’Œ
# uses: codecov/codecov-action@v1
# with:
# token: ${{ secrets.CODECOV_TOKEN }}
- name: build fusion docker image
run: |
docker build . --tag=nexus-web:fresh
- name: Start services
run: docker-compose -f ci/docker-compose.yml up -d && sleep 60
# - name: Copy nexus-web into Cypress container
# avoids permission issue where cypress writes screenshots to host with root as user
# which we can't then delete easily
# run: docker cp ./. cypress:/e2e
- name: e2e tests
run: echo | docker exec -t cypress xvfb-run -s '-screen 0 1920x1080x24' cypress run --headed --config-file cypress.config.ts --browser chrome --record --key ${{ secrets.CYPRESS_RECORD_KEY }}
- name: Cleanup Docker Containers
if: ${{ always() }}
run: docker-compose -f ci/docker-compose.yml down --rmi "local" --volumes