Skip to content

Add tab management, wait tools, and media permissions support #1178

Add tab management, wait tools, and media permissions support

Add tab management, wait tools, and media permissions support #1178

Workflow file for this run

name: CI
on:
pull_request_target:
push:
branches:
- main
schedule:
- cron: 0 0 * * *
workflow_dispatch:
concurrency:
group: ci-${{ github.event.pull_request.head.ref || github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request_target' }}
jobs:
test:
name: Test
runs-on: ubuntu-latest
env:
DISPLAY: :99
outputs:
permitted: ${{ steps.check-access.outputs.require-result }}
python-changed: ${{ steps.changed-files.outputs.python_any_changed }}
server-changed: ${{ steps.changed-files.outputs.server_any_changed }}
typescript-changed: ${{ steps.changed-files.outputs.typescript_any_changed }}
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha || github.sha }}
- id: check-access
uses: actions-cool/check-user-permission@v2
with:
require: write
username: ${{ github.triggering_actor }}
- id: changed-files
uses: tj-actions/changed-files@24d32ffd492484c1d75e0c0b894501ddb9d30d62 # v47
with:
files_yaml: |
python:
- packages/python/**
server:
- Dockerfile
- packages/python/**/server/**
typescript:
- packages/python/examples/support/pages/**
- packages/typescript/**
- uses: docker/setup-buildx-action@v3
- uses: actions/setup-node@v6
with:
cache: npm
cache-dependency-path: packages/typescript/package-lock.json
node-version-file: .tool-versions
- uses: actions/setup-python@v5
with:
python-version-file: .tool-versions
- uses: actions/cache@v4
with:
path: packages/python/.venv
key: venv-${{ hashFiles('packages/python/poetry.lock') }}
- run: Xvfb ${{ env.DISPLAY }} -screen 0 1600x1200x24 &
- run: pip install poetry=="$(grep poetry .tool-versions | cut -d" " -f2)"
- run: make install
- run: make build
- run: make check-format
- run: make test
- run: |
poetry run behave \
--format html-pretty \
--outfile reports/behave.html \
--format pretty
env:
OPENAI_API_KEY: ${{ github.token }}
working-directory: packages/python
- uses: docker/build-push-action@v6
with:
cache-from: type=gha
cache-to: type=gha,mode=max
context: .
- if: always()
uses: actions/upload-artifact@v4
with:
name: python-coverage-report
path: |
packages/python/htmlcov/
packages/python/coverage.xml
- if: failure() && runner.debug == '1'
uses: mxschmitt/action-tmate@v3
python:
name: Python
needs: test
secrets: inherit
if: >
needs.test.outputs.permitted == 'true'
&& needs.test.outputs.python-changed == 'true'
uses: ./.github/workflows/ci-python.yml
with:
sha: ${{ github.event.pull_request.head.sha || github.sha }}
typescript:
name: TypeScript
needs: test
secrets: inherit
if: >
needs.test.outputs.permitted == 'true'
&& (needs.test.outputs.server-changed == 'true' || needs.test.outputs.typescript-changed == 'true')
uses: ./.github/workflows/ci-typescript.yml
with:
sha: ${{ github.event.pull_request.head.sha || github.sha }}