Update type annotations for benchmark script #59
This file contains 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 | |
permissions: | |
contents: read | |
concurrency: | |
group: ${{ github.ref }} | |
cancel-in-progress: true | |
on: | |
push: | |
branches: | |
- main | |
- "renovate/**" | |
pull_request: | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: "3.12" | |
- uses: actions/cache@v3 | |
id: pip-cache | |
with: | |
path: .venv | |
key: draftjs_exporter-v3-${{ runner.os }}-py312-${{ hashFiles('**/requirements.txt') }} | |
- if: steps.pip-cache.outputs.cache-hit != 'true' | |
run: | | |
python -m venv .venv | |
source .venv/bin/activate | |
pip install -r requirements.txt | |
- run: | | |
source .venv/bin/activate | |
make lint | |
- run: | | |
source .venv/bin/activate | |
make benchmark | |
- run: | | |
source .venv/bin/activate | |
make build | |
- uses: actions/setup-node@v4 | |
with: | |
node-version-file: ".nvmrc" | |
- run: npm ci | |
- run: npm run lint | |
- run: | | |
source .venv/bin/activate | |
make test-coverage | |
test_compat: | |
needs: test | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
include: | |
- python: "3.8" | |
toxenv: py38-lower_bound_deps | |
- python: "3.9" | |
toxenv: py39-lower_bound_deps | |
- python: "3.10" | |
toxenv: py310-upper_bound_deps | |
- python: "3.11" | |
toxenv: py311-upper_bound_deps | |
- python: "3.12" | |
toxenv: py312-upper_bound_deps | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python }} | |
- run: pip install tox==4.11.4 setuptools==69.0.3 | |
- run: sudo apt-get install libxml2-dev libxslt-dev | |
- run: tox --parallel | |
env: | |
TOXENV: ${{ matrix.toxenv }} | |
# test_experimental: | |
# # Ad-hoc job to test experimental support without having to adjust all of our project for compatibility. | |
# needs: test | |
# runs-on: ubuntu-latest | |
# steps: | |
# - uses: actions/checkout@v4 | |
# - uses: actions/setup-python@v5 | |
# with: | |
# # See available versions: | |
# # https://github.com/actions/python-versions/blob/main/versions-manifest.json | |
# python-version: "3.13.0-alpha.2" | |
# - run: pip install build==0.8.0 beautifulsoup4>=4.4.1,<5 html5lib>=0.999,<2 | |
# - run: python -X dev -W error example.py | |
# - run: make build |