Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Amendement to ci test configuration #463

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 23 additions & 11 deletions .github/workflows/cypress-tests.yaml
Original file line number Diff line number Diff line change
@@ -1,20 +1,14 @@
name: Cypress tests

on:
pull_request:
paths:
- 'packages/ui/**/*'
- '.github/workflows/cypress-tests.yaml'

jobs:
cypress-run:
chopsticks-setup:
runs-on: ubuntu-latest
container:
image: cypress/browsers:latest
services:
postgres:
image: postgres:14
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -29,18 +23,34 @@ jobs:
key: ${{ runner.os }}-node_modules-files-build-${{ hashFiles('./yarn.lock') }}
restore-keys: |
${{ runner.os }}-node_modules-build-

- name: Install indexer deps
working-directory: squid
run: npm ci
- name: run indexer routine

- name: Run indexer routine
working-directory: squid
run: |
npm run codegen
npm run typegen
npm run build
npm run db:migrate

cypress-run:
needs: chopsticks-setup
runs-on: ubuntu-latest
container:
image: cypress/browsers:latest
options: --network=host
services:
postgres:
image: postgres:14
env:
DB_HOST: postgres
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
steps:
- name: Checkout
uses: actions/checkout@v4

# Install NPM dependencies, cache them correctly
# and run all Cypress tests
Expand All @@ -61,13 +71,15 @@ jobs:
wait-on: 'http://localhost:3333'
# custom test command to run
command: yarn test:ci

# store the screenshots if the tests fail
- name: Store screenshots
uses: actions/upload-artifact@v1
if: failure()
with:
name: cypress-screenshots
path: packages/ui/cypress/screenshots

# store the videos if the tests fail
- name: Store videos
uses: actions/upload-artifact@v1
Expand Down
Loading