[FS-254]: Cycle 33 Maintenance #725
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@v3 | |
- uses: pnpm/action-setup@v2 | |
with: | |
version: 8 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version-file: 'package.json' | |
cache: 'pnpm' | |
- name: Install dependencies | |
run: pnpm install | |
- name: Lint and Format | |
run: pnpm run lint:ci | |
- name: Spell Check | |
run: pnpm run spell | |
- name: Build | |
run: pnpm run build | |
- name: Test | |
run: pnpm run test:unit | |
chromatic: | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
environment: Chromatic | |
env: | |
APP_API_ENDPOINT: /graphql | |
NODE_ENV: development | |
APP_GRAPHQL_SCHEMA_URL: https://api.fullstacksjs.com/v1/graphql/ | |
APP_AUTH0_AUDIENCE: https://api.fullstacksjs.com/v1/graphql/ | |
APP_AUTH0_DOMAIN: dev-jxuskaag.us.auth0.com | |
APP_AUTH0_CLIENT_ID: ${{ secrets.APP_AUTH0_CLIENT_ID }} | |
APP_HASURA_ADMIN_SECRET: ${{ secrets.APP_HASURA_ADMIN_SECRET }} | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
with: | |
# NOTE: required because https://www.chromatic.com/docs/github-actions#support-for-codeactionscheckoutv2code-and-above | |
fetch-depth: 0 | |
- uses: pnpm/action-setup@v2 | |
with: | |
version: 8 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version-file: 'package.json' | |
cache: 'pnpm' | |
- name: Install dependencies | |
run: pnpm 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_GRAPHQL_SCHEMA_URL: https://api.fullstacksjs.com/v1/graphql/ | |
APP_AUTH0_AUDIENCE: https://api.fullstacksjs.com/v1/graphql/ | |
APP_API_ENDPOINT: https://api.fullstacksjs.com/v1/graphql/ | |
APP_AUTH0_DOMAIN: dev-jxuskaag.us.auth0.com | |
APP_AUTH0_CLIENT_ID: ${{ secrets.APP_AUTH0_CLIENT_ID }} | |
APP_HASURA_ADMIN_SECRET: ${{ secrets.APP_HASURA_ADMIN_SECRET }} | |
NODE_TLS_REJECT_UNAUTHORIZED: 0 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- uses: pnpm/action-setup@v2 | |
with: | |
version: 8 | |
- name: Run E2E tests | |
uses: cypress-io/github-action@v4 | |
with: | |
start: pnpm dlx vite --port ${{ env.PORT }} --host 127.0.0.1 | |
build: pnpm run build | |
wait-on: https://127.0.0.1:${{ env.PORT }} | |
wait-on-timeout: 20 | |
browser: chrome | |
env: | |
PORT: 3002 | |
CYPRESS_RECORD_KEY: ${{ vars.CYPRESS_RECORD_KEY }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Run Component tests | |
uses: cypress-io/github-action@v4 | |
with: | |
install: false | |
component: true | |
browser: chrome |