trigger ci #438
Workflow file for this run
This file contains hidden or 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: TS-Check & Test' | |
on: | |
push: | |
paths: | |
- 'devtools-ui/src/**' | |
- 'source/src/**' | |
- 'examples/src/**/*.spec.ts' | |
- 'examples/src/**/*.page.tsx' | |
concurrency: | |
group: ${{ github.workflow }} | |
cancel-in-progress: true | |
jobs: | |
# Install & caches "fresh" node_modules | |
# npm-install: | |
# name: Install npm deps | |
# runs-on: ubuntu-latest | |
# strategy: | |
# matrix: | |
# node-version: [20.x] | |
# steps: | |
# - uses: actions/checkout@v4 | |
# - name: Use Node.js ${{ matrix.node-version }} | |
# uses: actions/setup-node@v3 | |
# with: | |
# node-version: ${{ matrix.node-version }} | |
# cache: 'npm' | |
# cache-dependency-path: | | |
# package-lock.json | |
# source/package-lock.json | |
# examples/package-lock.json | |
# www/package-lock.json | |
# - name: Cache node_modules for root | |
# id: cache-node-modules-root | |
# uses: actions/cache@v3 | |
# with: | |
# path: node_modules | |
# key: node-modules-root-${{ github.run_id }} | |
# - name: Cache node_modules for source | |
# id: cache-node-modules-source | |
# uses: actions/cache@v3 | |
# with: | |
# path: source/node_modules | |
# key: node-modules-source-${{ github.run_id }} | |
# - name: Cache node_modules for examples | |
# id: cache-node-modules-examples | |
# uses: actions/cache@v3 | |
# with: | |
# path: examples/node_modules | |
# key: node-modules-examples-${{ github.run_id }} | |
# - name: Cache node_modules for www | |
# id: cache-node-modules-www | |
# uses: actions/cache@v3 | |
# with: | |
# path: www/node_modules | |
# key: node-modules-www-${{ github.run_id }} | |
# - name: Cache node_modules for www/dataserver | |
# id: cache-node-modules-www-dataserver | |
# uses: actions/cache@v3 | |
# with: | |
# path: www/dataserver/node_modules | |
# key: node-modules-www-dataserver-${{ github.run_id }} | |
# - name: Execute 'npm ci' in monorepo | |
# run: npm ci | |
# - name: Execute 'npm i' in www/dataserver | |
# run: npm run www-dataserver:install | |
# - name: Get installed Playwright version | |
# id: playwright-version | |
# run: echo "::set-output name=version::$(npm ls @playwright/test | grep @playwright | sed 's/.*@//')" | |
# working-directory: examples | |
# - name: Cache browser binaries for Playwright | |
# id: playwright-cache | |
# uses: actions/cache@v3 | |
# with: | |
# path: '~/.cache/ms-playwright' | |
# key: '${{ runner.os }}-playwright-${{ steps.playwright-version.outputs.version }}' | |
# Compiles all TS files in the monorepo | |
ts-check: | |
# needs: npm-install | |
name: Compile source code | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [20.x] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Execute 'npm ci' in monorepo | |
run: npm ci | |
- name: Install examples | |
run: npm ci --prefix examples | |
- name: Execute 'npm i' in www/dataserver | |
run: npm run www-dataserver:install | |
- name: Compile source code in monorepo | |
run: npm run ci:ts-check | |
run-tests: | |
# needs: npm-install | |
name: Run tests | |
runs-on: ubuntu-latest | |
env: | |
NEXT_PUBLIC_BASE_URL: https://infinite-table.com/.netlify/functions/json-server | |
strategy: | |
matrix: | |
node-version: [20.x] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Execute 'npm ci' in monorepo | |
run: npm ci | |
- name: Install examples | |
run: npm ci --prefix examples | |
- name: Execute 'npm i' in www/dataserver | |
run: npm run www-dataserver:install | |
- name: Get installed Playwright version | |
id: playwright-version | |
run: echo "::set-output name=version::$(npm ls @playwright/test | grep @playwright | sed 's/.*@//')" | |
working-directory: examples | |
- name: Restore cached browser binaries for Playwright | |
id: playwright-restore | |
uses: actions/cache/restore@v4 | |
with: | |
path: '~/.cache/ms-playwright' | |
key: '${{ runner.os }}-playwright-${{ steps.playwright-version.outputs.version }}' | |
- name: Install Playwright browsers | |
# this will not install anything if the previous step found a cached browser binary | |
run: npx playwright install --with-deps chromium | |
working-directory: examples | |
env: | |
CI: true | |
- name: Build component # in the www folder, some CSS files are used from the source/dist folder | |
run: npm run build | |
- name: Build test app | |
run: npm run ci:test:build | |
- name: Running Playwright Tests | |
run: npm run ci:test:run | |
env: | |
NEXT_PUBLIC_ADAPTABLE_LICENSE_KEY: ${{ secrets.NEXT_PUBLIC_ADAPTABLE_LICENSE_KEY }} | |
- name: Save browser binaries for Playwright | |
id: playwright-save | |
uses: actions/cache/save@v4 | |
with: | |
path: '~/.cache/ms-playwright' | |
key: '${{ runner.os }}-playwright-${{ steps.playwright-version.outputs.version }}' |