Fix Github CI, versionning and unit tests to prepare a release for latest Python versions #301
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: Playwright Tests | |
| on: | |
| push: | |
| branches: [ master, develop ] | |
| pull_request: | |
| branches: [ master, develop ] | |
| release: | |
| types: [published] | |
| workflow_dispatch: | |
| defaults: | |
| run: | |
| working-directory: dashboard/src | |
| jobs: | |
| test-dashboard-src-with-playwright: | |
| timeout-minutes: 60 | |
| runs-on: ubuntu-latest | |
| # Playwright requires Node.js 14 or higher. | |
| strategy: | |
| matrix: | |
| node-version: [18.x] | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Use Node.js ${{ matrix.node-version }} | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| # Launch Orion backend | |
| - name: Setup Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: 3.8 | |
| - name: Install Orion from local copy | |
| run: python -m pip install ../../.[profet] | |
| - name: Start fake Orion backend | |
| run: | | |
| # Start Orion backend in repository root folder. | |
| cd ../../ | |
| mkdir -p gunicorn_tmp_dir | |
| python .github/workflows/fake_orion_server.py > dashboard/src/fake-orion-backend-${{ matrix.node-version }}.log 2>&1 & | |
| cd dashboard/src/ | |
| - name: Install dependencies | |
| run: yarn | |
| # check files formatting using Carbon's `ci-check` script | |
| - name: Check files formatting | |
| run: yarn ci-check | |
| - name: Install Playwright Browsers | |
| run: yarn playwright install --with-deps | |
| # Launch Orion frontend, needed by Playwright | |
| - name: Build dashboard | |
| run: yarn build | |
| - name: Serve build | |
| run: ./node_modules/.bin/serve -l 3000 build/ & | |
| - name: Run Playwright tests (1) | |
| run: yarn playwright test --project=chromium --reporter=line | |
| - name: Run Playwright tests (2) | |
| run: yarn playwright test --project=chromium --reporter=line | |
| - name: Run Playwright tests (3) | |
| run: yarn playwright test --project=chromium --reporter=line | |
| - name: Run Playwright tests (4) | |
| run: yarn playwright test --project=chromium --reporter=line | |
| # Upload orion backend log. | |
| - name: Get Orion backend log | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: fake-orion-backend-log-artifact-${{ matrix.node-version }} | |
| path: dashboard/src/fake-orion-backend-${{ matrix.node-version }}.log |