revert case studies #39
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: Pre-release tests | |
on: | |
pull_request: | |
branches: | |
- main | |
jobs: | |
test-jupyterlab-demos: | |
runs-on: ubuntu-20.04 | |
timeout-minutes: 60 | |
strategy: | |
matrix: | |
python-version: ['3.7', '3.8', '3.10'] | |
fail-fast: false | |
steps: | |
- name: Cancel Previous Runs | |
uses: styfle/cancel-workflow-action@0.7.0 | |
with: | |
access_token: ${{ github.token }} | |
- uses: actions/checkout@v2 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
cache: pip | |
cache-dependency-path: | | |
mitosheet/setup.py | |
tests/requirements.txt | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
cache: 'npm' | |
cache-dependency-path: mitosheet/package-lock.json | |
- name: Install dependencies | |
run: | | |
cd tests | |
python3 -m venv venv | |
source venv/bin/activate | |
pip install mitosheet | |
pip install --upgrade -i https://test.pypi.org/simple/ mitosheet | |
# Install necessary node packages | |
npm install | |
npx playwright install chromium webkit firefox chrome | |
- name: Start a server and run tests | |
run: | | |
cd tests | |
source venv/bin/activate | |
jupyter lab --config jupyter_server_test_config.py & | |
npm run test:jupyterlab | |
- name: Upload test-results | |
uses: actions/upload-artifact@v3 | |
if: failure() | |
with: | |
name: jupyterlab-playwright-report-${{ matrix.python-version }} | |
path: tests/playwright-report/ | |
retention-days: 14 | |
test-streamlit-demos: | |
timeout-minutes: 60 | |
strategy: | |
matrix: | |
os: ['ubuntu-latest-m', 'macos-latest', 'windows-latest-l'] | |
python-version: ['3.10'] | |
demo: ['vanguard-fund-performance'] | |
project: ['chromium', 'firefox', 'webkit', 'Google Chrome', 'Microsoft Edge'] | |
exclude: | |
- os: 'windows-latest-l' | |
project: webkit | |
- os: 'macos-latest' | |
project: 'Microsoft Edge' | |
- os: 'ubuntu-latest-m' | |
project: 'Microsoft Edge' | |
- os: 'ubuntu-latest-m' | |
project: 'webkit' | |
fail-fast: false | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
cache: pip | |
cache-dependency-path: | | |
mitosheet/setup.py | |
tests/requirements.txt | |
tests/extra-requirements.txt | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
cache: 'npm' | |
cache-dependency-path: mitosheet/package-lock.json | |
- name: Install dependencies (ubuntu, macos) | |
if: matrix.os != 'windows-latest-l' | |
run: | | |
cd tests | |
python3 -m venv venv | |
source venv/bin/activate | |
pip install mitosheet streamlit | |
pip install --upgrade -i https://test.pypi.org/simple/ mitosheet | |
# Install necessary node packages | |
npm install | |
npx playwright install chromium webkit firefox chrome | |
- name: Setup streamlit (ubuntu, macos) | |
if: matrix.os != 'windows-latest-l' | |
run: | | |
mkdir -p ~/.streamlit/ | |
echo "[general]" > ~/.streamlit/credentials.toml | |
echo "email = \"\"" >> ~/.streamlit/credentials.toml | |
- name: Setup streamlit (windows) | |
if: matrix.os == 'windows-latest-l' | |
run: | | |
$streamlitDir = "$HOME\.streamlit" | |
if (-not (Test-Path -Path $streamlitDir)) { | |
New-Item -ItemType Directory -Path $streamlitDir | |
} | |
Set-Content -Path "$streamlitDir\credentials.toml" -Value @" | |
[general] | |
email = "" | |
"@ | |
- name: Install dependencies (windows) | |
if: matrix.os == 'windows-latest-l' | |
run: | | |
cd tests | |
python3 -m venv venv | |
.\venv\Scripts\Activate.ps1 | |
pip install mitosheet streamlit | |
pip install --upgrade -i https://test.pypi.org/simple/ mitosheet | |
# Install necessary node packages | |
npm install | |
npx playwright install chromium webkit firefox chrome | |
- name: Start a server and run tests (ubuntu, macos) | |
if: matrix.os != 'windows-latest-l' | |
run: | | |
cd tests | |
source venv/bin/activate | |
git clone https://github.com/mito-ds/every-feature-everywhere-all-at-once.git | |
cd every-feature-everywhere-all-at-once | |
streamlit run automation-app.py --server.port 8555 & | |
bash ../check_server.sh | |
npm run test:streamlit:demo -- --project="${{ matrix.project }}" | |
- name: Start a server and run tests (windows) | |
if: matrix.os == 'windows-latest-l' | |
run: | | |
cd tests | |
.\venv\Scripts\Activate.ps1 | |
git clone https://github.com/mito-ds/every-feature-everywhere-all-at-once.git | |
cd every-feature-everywhere-all-at-once | |
Start-Job { streamlit run automation-app.py --server.port 8555 } -WorkingDirectory (Get-Location) | |
npm run test:streamlit:demo -- --project="${{ matrix.project }}" | |
- name: Upload test-results | |
uses: actions/upload-artifact@v3 | |
if: always() | |
with: | |
name: streamlit-playwright-report | |
path: tests/playwright-report/ | |
retention-days: 14 | |