This repository has been archived by the owner on Feb 15, 2024. It is now read-only.
align on_action like parameters (#963) #2206
Workflow file for this run
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: Setuptools | |
on: | |
push: | |
branches: [ develop ] | |
pull_request: | |
branches: [ develop ] | |
workflow_dispatch: | |
jobs: | |
standard-packages: | |
timeout-minutes: 60 | |
strategy: | |
matrix: | |
python-versions: ['3.8', '3.9', '3.10', '3.11'] | |
os: [ubuntu-latest, windows-latest, macos-latest] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-versions }} | |
- name: Install npm | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '18' | |
- name: Install Taipy without dependencies | |
run: | | |
# Install package | |
echo "Install package" | |
pip install . | |
rm -r src | |
# Ensure `webapp` folder is present in lib package | |
echo "Ensure webapp folder is present in lib package" | |
python -c "import taipy.gui as gui;from pathlib import Path; assert Path(f'{gui.__path__[0]}/webapp/index.html').exists(), f'{gui.__path__[0]}/webapp/index.html not found!'" | |
# Run tests | |
echo "installing playwright" | |
pip install pytest pytest-mock playwright pytest-playwright pytest-timeout testbook | |
pip install ipython ipykernel | |
ipython kernel install --name "python3" --user | |
playwright install chromium --with-deps | |
echo "running pytest" | |
pytest -s | |
echo "running test import tp" | |
python -c "import taipy as tp; tp.Gui" | |
optional-packages: | |
timeout-minutes: 60 | |
strategy: | |
matrix: | |
python-versions: ['3.8', '3.9', '3.10', '3.11'] | |
os: [ubuntu-latest, windows-latest, macos-latest] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-versions }} | |
- name: Install npm | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '18' | |
- name: install libmagic on macos | |
if: matrix.os == 'macos-latest' | |
run: brew install libmagic | |
- name: Add optionals dependencies | |
run: | | |
# Extract optionals packages before installing them | |
grep -n 'setup(' setup.py | cut -d ":" -f 1 | xargs -I% bash -c "expr % - 1" | xargs -I% bash -c 'head -n% setup.py' > setup_packages.py | |
echo "[print(k) for k in extras_require.keys()]" >> setup_packages.py | |
python setup_packages.py | xargs -I% bash -c "pip install .[%]" | |
# Ensure `webapp` folder is present in lib package | |
python -c "import taipy.gui as gui;from pathlib import Path; assert Path(f'{gui.__path__[0]}/webapp/index.html').exists(), f'{gui.__path__[0]}/webapp/index.html not found!'" | |
# Removal of Taipy code to ensure the use of the installed package. | |
rm -r src | |
# Run test with optionals packages installed | |
echo "installing playwright" | |
pip install pytest pytest-mock playwright pytest-playwright pytest-timeout testbook | |
pip install ipython ipykernel | |
ipython kernel install --name "python3" --user | |
playwright install chromium --with-deps | |
echo "running pytest" | |
pytest -s | tee pytest_res | |
cat pytest_res | |
echo "Ensure that no tests are skipped" | |
tail -n1 pytest_res | grep --invert-match "skipped" | |
echo "Ensure that no warnings are issued" | |
tail -n1 pytest_res | grep --invert-match "warning" | |
echo "Ensure that no tests are failed" | |
tail -n1 pytest_res | grep --invert-match "failed" |