Update download table to handle dev version numbers #236
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: App Tests | |
| on: | |
| push: | |
| # branches: | |
| # - main | |
| # - rel_* | |
| pull_request: | |
| defaults: | |
| run: | |
| # -l: use login shell (required when using Conda) | |
| shell: bash -l {0} | |
| env: | |
| PYTEST_ADDOPTS: --color=yes | |
| jobs: | |
| component_e2e_testing: | |
| name: E2E testing (${{ matrix.os }}/Python${{matrix.python-version}}) | |
| runs-on: ${{ matrix.os-version }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: | |
| - linux | |
| - win64 | |
| include: | |
| - os: linux | |
| os-version: ubuntu-22.04 | |
| - os: win64 | |
| os-version: windows-latest | |
| python-version: | |
| - 3.12 | |
| - 3.13 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| # - uses: conda-incubator/setup-miniconda@v3 | |
| # with: | |
| # environment-file: environment.yml | |
| # python: ${{ matrix.python-version }} | |
| # activate-environment: flowsheet-processor-env | |
| # miniforge-version: latest | |
| - uses: conda-incubator/setup-miniconda@v3 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| miniforge-version: latest | |
| activate-environment: ifp-build-env | |
| channels: conda-forge,nodefaults | |
| - name: Install conda dependencies | |
| run: | | |
| conda install -c conda-forge nodejs=22.3.0 -y | |
| pip install -r backend/requirements-full.txt | |
| - name: Set up debug logging | |
| run: | | |
| echo "ACTIONS_RUNNER_DEBUG=true" >> $GITHUB_ENV | |
| echo "ACTIONS_STEP_DEBUG=true" >> $GITHUB_ENV | |
| - name: Add theme to .env file | |
| working-directory: ./frontend | |
| run: | | |
| echo REACT_APP_THEME=watertap >> .env | |
| - name: Install frontend JS dependencies | |
| working-directory: ./frontend | |
| run: | | |
| npm install | |
| - name: Install Python package | |
| run: | | |
| pip install --progress-bar off . | |
| - name: Install WaterTAP for testing purposes | |
| run: pip install watertap@git+https://github.com/watertap-org/watertap@main | |
| - name: get idaes extensions | |
| run: idaes get-extensions | |
| - name: run backend server | |
| run: uvicorn --app-dir backend/src/idaes_flowsheet_processor_ui main:app --reload --host 127.0.0.1 --port 8001 & sleep 30 | |
| - name: run frontend | |
| working-directory: frontend | |
| run: npm start & sleep 30 | |
| - name: run component tests | |
| working-directory: frontend | |
| run: npm run test | |
| - name: Cypress e2e tests | |
| working-directory: frontend | |
| timeout-minutes: 45 | |
| run: npx cypress run | |
| - name: Upload artifact for screenshots & videos | |
| uses: actions/upload-artifact@v4 | |
| if: always() | |
| with: | |
| name: cypress_results-${{ matrix.os }}-${{matrix.python-version}} | |
| path: | | |
| frontend/cypress/screenshots/ | |
| frontend/cypress/videos/ | |
| ## The following 2 steps attempt to ensure that the | |
| ## Post Run conda-incubator/setup-miniconda@v3 won't fail | |
| - name: Kill Python processes | |
| if: always() | |
| shell: bash | |
| run: | | |
| if [[ "$RUNNER_OS" == "Windows" ]]; then | |
| powershell.exe -Command "Get-Process python | Stop-Process -Force" | |
| else | |
| pkill -f python || echo "No Python processes found" | |
| fi | |
| - name: Clean up Conda environment | |
| if: always() | |
| shell: bash | |
| run: | | |
| if [[ "$RUNNER_OS" == "Windows" ]]; then | |
| source C:/Users/runneradmin/miniconda3/etc/profile.d/conda.sh | |
| fi | |
| conda deactivate || true | |
| conda env remove --name pareto-ui-env || true | |
| pytest: | |
| name: pytest (${{ matrix.os }}/${{matrix.python-version}}) | |
| runs-on: ${{ matrix.os-version }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: | |
| - linux | |
| - win64 | |
| # - macos | |
| include: | |
| - os: linux | |
| os-version: ubuntu-22.04 | |
| - os: win64 | |
| os-version: windows-latest | |
| python-version: | |
| - 3.12 | |
| - 3.13 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: conda-incubator/setup-miniconda@v3 | |
| with: | |
| environment-file: environment.yml | |
| activate-environment: flowsheet-processor-env | |
| miniforge-version: latest | |
| # Set project as environment variable. This can also be set by the frontend. | |
| - name: Set env | |
| run: echo "project=nawi" >> $GITHUB_ENV | |
| - name: Install Python package | |
| run: | | |
| pip install --progress-bar off .[testing] | |
| - name: Install WaterTAP for testing purposes | |
| run: pip install watertap@git+https://github.com/watertap-org/watertap@main | |
| - name: get idaes extensions | |
| run: idaes get-extensions | |
| - name: Run pytest | |
| working-directory: backend/src/idaes_flowsheet_processor_ui | |
| run: | | |
| pytest . -v |