update monorepo deps, prep for show suspension activity mini-feature #866
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: | |
push: | |
branches: | |
- master | |
pull_request: | |
types: [opened, synchronize, labeled] | |
jobs: | |
check: | |
name: check | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout | |
uses: actions/checkout@v3 | |
- name: install pnpm | |
uses: pnpm/action-setup@v2 | |
- name: get pnpm store path | |
id: pnpm-cache | |
run: | | |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT | |
- uses: actions/cache@v3 | |
with: | |
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }} | |
key: pnpm-cache-v1-${{ hashFiles('**/pnpm-lock.yaml') }} | |
restore-keys: pnpm-cache-v1- | |
- name: install deps | |
run: pnpm install | |
- name: setup just | |
uses: extractions/setup-just@v1 | |
- name: lint | |
run: just lint | |
- name: format | |
run: just format-check | |
- name: typecheck | |
run: just typecheck | |
- name: test | |
run: just test | |
storybook: | |
name: storybook | |
runs-on: ubuntu-latest | |
env: | |
ARGOS_TOKEN: ${{ secrets.ARGOS_TOKEN }} | |
RUN_ARGOS: | |
${{ contains(github.event.pull_request.labels.*.name, 'run-argos') || | |
github.event_name == 'push' }} | |
steps: | |
- name: checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 2 | |
- name: install pnpm | |
uses: pnpm/action-setup@v2 | |
- name: get pnpm store path | |
id: pnpm-cache | |
run: | | |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT | |
- uses: actions/cache@v3 | |
with: | |
path: | | |
${{ steps.pnpm-cache.outputs.STORE_PATH }} | |
~/.cache/puppeteer | |
key: pnpm-cache-v1-${{ hashFiles('**/pnpm-lock.yaml') }} | |
restore-keys: pnpm-cache-v1- | |
- name: install deps | |
run: pnpm install | |
- name: setup just | |
uses: extractions/setup-just@v1 | |
- name: build storybook | |
run: STORYBOOK_SCREENSHOT_TESTING=true just build-storybook | |
- name: serve storybook | |
if: env.RUN_ARGOS == 'true' | |
run: | | |
mv -f storybook/storybook-static/{iframe,index}.html | |
pnpm dlx [email protected] -l 4777 storybook/storybook-static & | |
- name: screenshots | |
if: env.RUN_ARGOS == 'true' | |
run: | | |
just visual-test | |
pnpm dlx @argos-ci/cli upload storybook/visual-tests/screenshots/argos || true | |
- name: create screenshots pr | |
id: pr | |
uses: peter-evans/create-pull-request@v4 | |
if: env.RUN_ARGOS == 'true' && github.event_name == 'pull_request' | |
with: | |
base: ${{ github.head_ref }} | |
commit-message: '[automated] update screenshots from CI' | |
branch: screenshots/patch/${{ github.head_ref }} | |
delete-branch: true | |
title: update screenshots from CI | |
- name: pr comment | |
if: ${{ steps.pr.outputs.pull-request-number }} | |
uses: mshick/add-pr-comment@v2 | |
with: | |
message: 'PR for changed screenshots: ${{ steps.pr.outputs.pull-request-url }}' | |
dashboard: | |
name: dashboard | |
runs-on: ubuntu-latest | |
env: | |
VITE_API_ENDPOINT: ${{ secrets.STAGING_API_ENDPOINT }} | |
VITE_TEST_ADMIN_CREDS: ${{ secrets.TEST_ADMIN_CREDS }} | |
steps: | |
- name: reset staging # cypress tests depend slightly on staging api state | |
run: curl --silent ${{ secrets.STAGING_API_RESET_ROUTE }}; true | |
- name: checkout | |
uses: actions/checkout@v3 | |
- name: install pnpm | |
uses: pnpm/action-setup@v2 | |
- name: get pnpm store path | |
id: pnpm-cache | |
run: | | |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT | |
- uses: actions/cache@v3 | |
with: | |
path: | | |
${{ steps.pnpm-cache.outputs.STORE_PATH }} | |
~/.cache/Cypress | |
key: pnpm-cache-v1-${{ hashFiles('**/pnpm-lock.yaml') }} | |
restore-keys: pnpm-cache-v1- | |
- name: install deps | |
run: pnpm install | |
- name: setup just | |
uses: extractions/setup-just@v1 | |
- name: build dashboard | |
run: just build-dash | |
- name: cypress | |
uses: cypress-io/[email protected] | |
with: | |
start: pnpm --filter @dash/app preview | |
project: dash/app | |
- name: upload-videos | |
uses: actions/upload-artifact@v3 | |
if: failure() | |
with: | |
name: cypress-videos | |
path: dash/app/cypress/videos | |
site: | |
name: site | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout | |
uses: actions/checkout@v3 | |
- name: install pnpm | |
uses: pnpm/action-setup@v2 | |
- name: get pnpm store path | |
id: pnpm-cache | |
run: | | |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT | |
- uses: actions/cache@v3 | |
with: | |
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }} | |
key: pnpm-cache-v1-${{ hashFiles('**/pnpm-lock.yaml') }} | |
restore-keys: pnpm-cache-v1- | |
- name: install deps | |
run: pnpm install | |
- name: setup just | |
uses: extractions/setup-just@v1 | |
- name: build site | |
run: just build-site |