Skip to content

handle: if excel plugin was not installed #89

handle: if excel plugin was not installed

handle: if excel plugin was not installed #89

Workflow file for this run

name: 'test-build'
on:
workflow_dispatch:
push:
branches:
- build
paths:
- "handshake-nodejs-reporters/**"
- "handshake/**"
- ".github/**"
- "__test__/**"
- "noxfile.py"
- "**test-build.yml"
- "poetry.toml"
- "pyproject.toml"
- "poetry.lock"
jobs:
decide:
# TODO: skip decide job if manually triggered
runs-on: ubuntu-latest
outputs:
# dashboard: ${{ steps.filter.outputs.dashboard }}
py: ${{ steps.filter.outputs.py }}
# common_nodejs_reporters: ${{ steps.filter.outputs.common_nodejs_reporters }}
# wdio_reporter: ${{ steps.filter.outputs.wdio_reporter }}
name: decides which job to run based on the file changes
steps:
- uses: actions/checkout@v4
- uses: dorny/paths-filter@v3
id: filter
with:
filters: |
dashboard:
- 'handshake-nodejs-reporters/packages/handshake-dashboard/**'
py:
- 'handshake/**'
- "poetry.toml"
- "pyproject.toml"
- "poetry.lock"
common_nodejs_reporters:
- 'handshake-nodejs-reporters/packages/common-handshakes/**'
wdio_reporter:
- 'handshake-nodejs-reporters/apps/test-wdio-*'
- 'handshake-nodejs-reporters/packages/wdio-handshake-reporter/**'
test-dashboard:
needs: decide
name: testing the dashboard build
runs-on: 'ubuntu-latest'
if: ${{ needs.decide.outputs.dashboard == 'true' }}
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
name: Install pnpm
with:
version: 8
run_install: false
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: 20.9.0
cache: 'pnpm'
cache-dependency-path: handshake-nodejs-reporters/pnpm-lock.yaml
- name: Installing node packages
working-directory: ./handshake-nodejs-reporters/packages/handshake-dashboard
run: pnpm install && pnpm install @swc/cli @swc/core wait-on concurrently http-server playwright && npx playwright install --with-deps
- name: Building storybook
working-directory: ./handshake-nodejs-reporters/packages/handshake-dashboard
run: pnpm build-storybook --quiet
- name: Conducting Component Tests
working-directory: ./handshake-nodejs-reporters/packages/handshake-dashboard
run: npx concurrently -k -s first -n "SB,TEST" -c "magenta,blue" \
"npx http-server storybook-static --port 6006 --silent" \
"npx wait-on tcp:6006 && pnpm test"
- name: Building Dashboard
working-directory: ./handshake-nodejs-reporters/packages/handshake-dashboard
run: pnpm build
test-handshakes:
needs: decide
name: check if the py-build for handshake is stable
runs-on: ${{ matrix.os }}
if: ${{ needs.decide.outputs.py == 'true' }}
strategy:
matrix:
os: ['macos-latest', 'windows-latest', 'ubuntu-latest']
steps:
- uses: actions/checkout@v4
- name: If in ubuntu, Install sqlite3 3.45.0
if: ${{ matrix.os == 'ubuntu-latest' }}
run: |
bash ./.github/scripts/build-sqlite.sh
- name: Set up Python 3.11 & 3.12
uses: actions/setup-python@v5
with:
python-version: |
3.11
3.12
- name: Set up venv
run: |
python -m venv venv
- name: Activate venv if not Windows
if: ${{ matrix.os != 'windows-latest' }}
run: |
source ./venv/bin/activate
- name: Activate venv if Windows
if: ${{ matrix.os == 'windows-latest' }}
run: ./venv/scripts/activate
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install poetry nox
poetry install
- name: Regression Test
run: nox -s test
test-common-nodejs-reporters:
needs: [decide, test-dashboard, test-handshakes]
name: test the common-nodejs-reporters build
runs-on: "windows-latest"
if: ${{ !failure() && ( needs.decide.outputs.common_nodejs_reporters == 'true' || needs.decide.outputs.wdio_reporter == 'true' ) }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
name: Install pnpm
with:
version: 8
run_install: false
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: 20.9.0
cache: 'pnpm'
cache-dependency-path: handshake-nodejs-reporters/pnpm-lock.yaml
- name: Set up Python 3.11
uses: actions/setup-python@v5
with:
python-version: |
3.11
- name: Set up venv
run: |
python -m venv venv
- name: Install dependencies
# please note, nox is not installed, here.
run: |
python -m pip install --upgrade pip
pip install poetry
poetry install
- name: Activate venv
run: ./venv/scripts/activate
- name: Setup Turbo Repo.
working-directory: ./handshake-nodejs-reporters
run:
pnpm install
- name: Building files
working-directory: ./handshake-nodejs-reporters
run: pnpm build
- name: conduct tests
working-directory: ./handshake-nodejs-reporters/packages/common-handshakes
if: ${{ needs.decide.outputs.common_nodejs_reporters == 'true' }}
# NOTE: common-handshakes tests alone can be triggered if required
run: npm run test
- name: conduct e2e tests
working-directory: ./handshake-nodejs-reporters
if: ${{ needs.decide.outputs.wdio_reporter == 'true' }}
continue-on-error: true
run: pnpm run test-wdio