Skip to content

Improved Breakage Form #1774

Improved Breakage Form

Improved Breakage Form #1774

Workflow file for this run

name: Test & Deploy Docs
on:
pull_request:
push:
branches:
- main
permissions:
contents: read
pages: write
id-token: write
deployments: write
jobs:
build:
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- name: Use Node.js from .nvmrc
uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
- name: Cache node modules
id: cache-npm
uses: actions/cache@v3
env:
cache-name: cache-node-modules
with:
path: node_modules
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
- name: Cache build outputs
id: build-output
uses: actions/cache@v3
with:
path: build/docs
key: build-output-${{ github.run_id }}
- name: Install dependencies
run: npm ci
- name: Run lint
run: npm run lint
- name: Build all
run: npm run build && npm run build.debug
- name: Fetch fonts
run: npm run fetch-fonts
- name: Run tests
run: npm run test.unit
###
### Run clean-tree following the build - no changes should be present
###
- name: Clean tree (build)
run: npm run test.clean-tree
- name: Install Playwright Browsers
run: npx playwright install --with-deps
- name: Run Playwright tests (none-screenshots)
run: npm run test.int -- --grep-invert @screenshots
- name: Run Playwright tests (screenshots only)
run: npm run test.int -- --grep @screenshots
id: screenshot_tests
- uses: actions/upload-artifact@v3
if: always()
with:
name: playwright-report
path: playwright-report/
retention-days: 30
- if: ${{ failure() && steps.screenshot_tests.conclusion == 'failure' }}
run: npm run test.int -- --grep @screenshots --update-snapshots
- if: ${{ failure() && steps.screenshot_tests.conclusion == 'failure' }}
name: Upload screens
uses: actions/upload-artifact@v3
with:
name: integration-tests
path: integration-tests/
retention-days: 10
- name: Build docs
run: npm run docs
- name: copy-to-docs
run: cp -r build/app-debug/ build/docs/app-debug
deploy:
runs-on: macos-latest
needs: build
if: ${{ github.ref == 'refs/heads/main' }}
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- uses: actions/checkout@v3
- name: Use Node.js from .nvmrc
uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
- name: Cache build outputs
id: build-output
uses: actions/cache@v3
with:
path: build/docs
key: build-output-${{ github.run_id }}
- name: Setup Github Pages
uses: actions/configure-pages@v3
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
path: build/docs
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2