d2e-ui/portal tests #13738
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: d2e-ui/portal tests | |
| permissions: | |
| contents: read | |
| on: | |
| pull_request: | |
| types: [opened, ready_for_review, reopened, synchronize] | |
| merge_group: | |
| push: | |
| branches: | |
| - develop | |
| jobs: | |
| pick_runner: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| random_runner: ${{ steps.shuffle.outputs.random_runner }} | |
| steps: | |
| - id: shuffle | |
| run: echo "random_runner=$(shuf -e ubuntu-22.04 ubuntu-24.04 | head -n 1)" >> "$GITHUB_OUTPUT" | |
| test-alp-portal-frontend: | |
| needs: [pick_runner] | |
| runs-on: ${{ needs.pick_runner.outputs.random_runner }} | |
| defaults: | |
| run: | |
| working-directory: ./plugins/ui | |
| steps: | |
| - name: Free Disk Space (Ubuntu) | |
| uses: jlumbroso/free-disk-space@main | |
| with: | |
| # this might remove tools that are actually needed, | |
| # if set to "true" but frees about 6 GB | |
| tool-cache: true | |
| # all of these default to true, but feel free to set to | |
| # "false" if necessary for your workflow | |
| android: true | |
| dotnet: true | |
| haskell: true | |
| large-packages: true | |
| docker-images: true | |
| swap-storage: true | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - uses: dorny/paths-filter@v3 | |
| id: check_file_changed | |
| with: | |
| filters: | | |
| portal_fe_changed: | |
| - './plugins/ui/apps/portal/**' | |
| - '.github/workflows/ui-alp-portal-test-fe.yml' | |
| - name: Setup bun if files have changed | |
| uses: oven-sh/setup-bun@v2 | |
| if: github.ref_name == 'develop' || github.event_name == 'merge_group' || steps.check_file_changed.outputs.portal_fe_changed == 'true' | |
| with: | |
| bun-version: 1.2.23 | |
| # Run the step only with "portal_fe_changed" equals "True" | |
| - name: Run unit tests if files have changed | |
| if: github.ref_name == 'develop' || github.event_name == 'merge_group' || steps.check_file_changed.outputs.portal_fe_changed == 'true' | |
| run: | | |
| bun install | |
| bunx nx run @portal/components:build | |
| bunx nx run portal:test |