[FS-295]: Cycle 81 Maintenance #806
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
pull_request: | |
branches: | |
- dev | |
push: | |
branches: | |
- dev | |
concurrency: ci-${{ github.ref }} | |
jobs: | |
verify: | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 20 | |
cache: 'npm' | |
- name: Install dependencies | |
run: npm install | |
- name: Lint and Format | |
run: npm run lint:ci | |
- name: Build | |
run: npm run build | |
- name: Test | |
run: npm run test:unit | |
chromatic: | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
environment: Chromatic | |
env: | |
APP_API_ENDPOINT: /graphql | |
NODE_ENV: development | |
APP_FILE_STORAGE_API_ENDPOINT: ${{vars.APP_FILE_STORAGE_API_ENDPOINT }} | |
APP_GRAPHQL_SCHEMA_URL: ${{ vars.APP_GRAPHQL_SCHEMA_URL }} | |
APP_AUTH0_AUDIENCE: ${{ vars.APP_AUTH0_AUDIENCE }} | |
APP_AUTH0_DOMAIN: ${{ vars.APP_AUTH0_DOMAIN }} | |
APP_AUTH0_CLIENT_ID: ${{ secrets.APP_AUTH0_CLIENT_ID }} | |
APP_HASURA_ADMIN_SECRET: ${{ secrets.APP_HASURA_ADMIN_SECRET }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 20 | |
cache: 'npm' | |
- run: npm install | |
- name: Deploy Chromatic | |
uses: chromaui/action@v1 | |
with: | |
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }} | |
exitZeroOnChanges: true # NOTE: Option to prevent the workflow from failing | |
cypress-run: | |
runs-on: ubuntu-latest | |
timeout-minutes: 20 | |
environment: Preview | |
env: | |
APP_FILE_STORAGE_API_ENDPOINT: ${{vars.APP_FILE_STORAGE_API_ENDPOINT }} | |
APP_GRAPHQL_SCHEMA_URL: ${{ vars.APP_GRAPHQL_SCHEMA_URL }} | |
APP_AUTH0_AUDIENCE: ${{ vars.APP_AUTH0_AUDIENCE }} | |
APP_API_ENDPOINT: ${{ vars.APP_API_ENDPOINT }} | |
APP_AUTH0_DOMAIN: ${{ vars.APP_AUTH0_DOMAIN }} | |
APP_AUTH0_CLIENT_ID: ${{ secrets.APP_AUTH0_CLIENT_ID }} | |
APP_HASURA_ADMIN_SECRET: ${{ secrets.APP_HASURA_ADMIN_SECRET }} | |
NODE_TLS_REJECT_UNAUTHORIZED: 0 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 20 | |
cache: 'npm' | |
- name: Run E2E tests | |
uses: cypress-io/github-action@v6 | |
env: | |
PORT: 5173 | |
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }} | |
CYPRESS_PROJECT_ID: ${{ secrets.CYPRESS_PROJECT_ID }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
CYPRESS_RECORD_VIDEO: true | |
with: | |
start: npx vite --host 127.0.0.1 | |
wait-on: https://127.0.0.1:5173 | |
wait-on-timeout: 20 | |
browser: chrome | |
record: true | |
- name: Run Component tests | |
uses: cypress-io/github-action@v6 | |
with: | |
install: false | |
component: true | |
browser: chrome |