Skip to content

Bump markdown-to-jsx, @storybook/addon-essentials and @storybook/blocks #878

Bump markdown-to-jsx, @storybook/addon-essentials and @storybook/blocks

Bump markdown-to-jsx, @storybook/addon-essentials and @storybook/blocks #878

Workflow file for this run

name: Cypress tests
on: push
jobs:
cypress-run:
name: Cypress run
runs-on: ubuntu-22.04
steps:
- uses: ikalnytskyi/action-setup-postgres@v5
with:
database: duostories_test_db
- name: Checkout
uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: 20
- uses: actions/cache@v3
with:
# See here for caching with `yarn` https://github.com/actions/cache/blob/main/examples.md#node---yarn or you can leverage caching with actions/setup-node https://github.com/actions/setup-node
path: |
~/.npm
${{ github.workspace }}/.next/cache
# Generate a new cache whenever packages or source files change.
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}-${{ hashFiles('**/*.js', '**/*.jsx', '**/*.ts', '**/*.tsx') }}
# If source files changed but packages didn't, rebuild from a prior cache.
restore-keys: |
${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}-
- name: init db
run: |
export PGPASSWORD=postgres
psql -U postgres -h localhost -d duostories_test_db -f database/schema.sql
psql -U postgres -h localhost -d duostories_test_db -c \\dt
- run: |
printf "${{ secrets.ENV_LOCAL }}" >> .env.local
export POSTGRES_URL=postgresql://postgres:postgres@localhost:5432/duostories_test_db
- name: Cypress run
uses: cypress-io/github-action@v6
with:
record: true
build: npm run init-build
start: npm run start
wait-on: "http://localhost:3000"
wait-on-timeout: 600
env:
# pass the Cypress Cloud record key as an environment variable
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
# pass GitHub token to allow accurately detecting a build vs a re-run build
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}