Skip to content

chore(deps): update dependency @testing-library/react to v15 - autoclosed #2725

chore(deps): update dependency @testing-library/react to v15 - autoclosed

chore(deps): update dependency @testing-library/react to v15 - autoclosed #2725

Workflow file for this run

name: Build Lint Test
on:
push:
branches:
- main
pull_request:
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
name: Build
runs-on: ubuntu-22.04
timeout-minutes: 10
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Installing Node
uses: actions/setup-node@v4
with:
node-version-file: ".node-version"
- name: Caching Yarn Dependencies
uses: actions/cache@v4
timeout-minutes: 10
env:
SEGMENT_DOWNLOAD_TIMEOUT_MINS: 5
with:
path: |
node_modules
key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install Dependencies
run: yarn install --frozen-lockfile
- name: Build
run: yarn build
lint:
name: Lint
runs-on: ubuntu-22.04
timeout-minutes: 10
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Installing Node
uses: actions/setup-node@v4
with:
node-version-file: ".node-version"
- name: Caching Yarn Dependencies
uses: actions/cache@v4
timeout-minutes: 10
env:
SEGMENT_DOWNLOAD_TIMEOUT_MINS: 5
with:
path: |
node_modules
key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install Dependencies
run: yarn install --frozen-lockfile
- name: Lint
run: yarn lint
test:
name: Test
runs-on: ubuntu-22.04
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Installing Node
uses: actions/setup-node@v4
with:
node-version-file: ".node-version"
- name: Caching Yarn Dependencies
uses: actions/cache@v4
timeout-minutes: 10
env:
SEGMENT_DOWNLOAD_TIMEOUT_MINS: 5
with:
path: |
node_modules
key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install Dependencies
run: yarn install --frozen-lockfile
- name: Run Tests
run: yarn test:ci
- name: Upload code coverage to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
name: codecov-umbrella
flags: unittests
fail_ci_if_error: true
test-e2e:
name: Test E2E
runs-on: ubuntu-22.04
# Service containers to run with `container-job`
services:
# Label used to access the service container
postgres:
# Docker Hub image
image: postgres
# Provide the password for postgres
env:
POSTGRES_USER: pguser
POSTGRES_PASSWORD: password
POSTGRES_DB: onlaunch
# exposing ports for application to use
ports:
- 5432/tcp
# Set health checks to wait until postgres has started
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Installing Node
uses: actions/setup-node@v4
with:
node-version-file: ".node-version"
- name: Caching Yarn Dependencies
uses: actions/cache@v4
timeout-minutes: 10
env:
SEGMENT_DOWNLOAD_TIMEOUT_MINS: 5
with:
path: |
node_modules
/home/runner/.cache
key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install Dependencies
run: yarn install --frozen-lockfile
- name: Reset the database
env:
DATABASE_URL: "postgresql://pguser:password@localhost:${{ job.services.postgres.ports[5432] }}/onlaunch?schema=public"
run: yarn prisma migrate reset -f
- name: Cypress run
uses: cypress-io/github-action@v3
with:
project: ./
browser: chrome
build: yarn build
start: yarn start
wait-on: "http://localhost:3000"
env:
DATABASE_URL: "postgresql://pguser:password@localhost:${{ job.services.postgres.ports[5432] }}/onlaunch?schema=public"