feat: add playground app #333
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: Test Workflow | |
| on: | |
| workflow_call: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| concurrency: | |
| group: test-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| name: Test | |
| timeout-minutes: 12 | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - name: Install FVM | |
| shell: bash | |
| run: | | |
| curl -fsSL https://fvm.app/install.sh | bash | |
| echo "/home/runner/fvm/bin" >> $GITHUB_PATH | |
| - uses: kuhnroyal/flutter-fvm-config-action@v2 | |
| id: fvm-config-action | |
| - uses: subosito/flutter-action@v2 | |
| with: | |
| flutter-version: ${{ steps.fvm-config-action.outputs.FLUTTER_VERSION }} | |
| channel: stable | |
| - name: Align Melos SDK path | |
| run: | | |
| mkdir -p .fvm | |
| ln -sfn "$FLUTTER_ROOT" .fvm/flutter_sdk | |
| - name: Setup Melos | |
| uses: bluefireteam/melos-action@v3 | |
| - uses: invertase/github-action-dart-analyzer@v1 | |
| with: | |
| fatal-infos: false | |
| fatal-warnings: false | |
| - name: Install dependencies | |
| run: fvm flutter pub get | |
| - name: Build Runner | |
| run: melos run build_runner:build | |
| timeout-minutes: 5 | |
| - name: Check Contract Schemas | |
| run: melos run contracts:check --no-select | |
| - name: Run Unit Tests | |
| run: melos run test --no-select | |
| integration-test: | |
| runs-on: ubuntu-latest | |
| name: Integration Tests | |
| timeout-minutes: 25 | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - name: Install Linux Desktop Dependencies | |
| timeout-minutes: 8 | |
| run: | | |
| sudo apt-get update -o Acquire::Retries=3 | |
| sudo apt-get install -y -o Dpkg::Lock::Timeout=60 libgtk-3-dev ninja-build pkg-config | |
| - name: Install FVM | |
| shell: bash | |
| run: | | |
| curl -fsSL https://fvm.app/install.sh | bash | |
| echo "/home/runner/fvm/bin" >> $GITHUB_PATH | |
| - uses: kuhnroyal/flutter-fvm-config-action@v2 | |
| id: fvm-config-action | |
| - uses: subosito/flutter-action@v2 | |
| with: | |
| flutter-version: ${{ steps.fvm-config-action.outputs.FLUTTER_VERSION }} | |
| channel: stable | |
| - name: Align Melos SDK path | |
| run: | | |
| mkdir -p .fvm | |
| ln -sfn "$FLUTTER_ROOT" .fvm/flutter_sdk | |
| - name: Setup Melos | |
| uses: bluefireteam/melos-action@v3 | |
| - name: Install dependencies | |
| run: fvm flutter pub get | |
| - name: Build Runner | |
| run: melos run build_runner:build | |
| timeout-minutes: 5 | |
| - name: Build SuperDeck Assets | |
| run: | | |
| cd demo | |
| fvm dart run superdeck_cli:main build | |
| timeout-minutes: 5 | |
| - name: Run Integration Tests | |
| uses: coactions/setup-xvfb@v1 | |
| with: | |
| run: melos run test:integration --no-select | |
| timeout-minutes: 7 | |
| web-smoke: | |
| runs-on: ubuntu-latest | |
| name: Web Smoke (Playwright) | |
| timeout-minutes: 25 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install FVM | |
| shell: bash | |
| run: | | |
| curl -fsSL https://fvm.app/install.sh | bash | |
| echo "/home/runner/fvm/bin" >> $GITHUB_PATH | |
| - uses: kuhnroyal/flutter-fvm-config-action@v2 | |
| id: fvm-config-action | |
| - uses: subosito/flutter-action@v2 | |
| with: | |
| flutter-version: ${{ steps.fvm-config-action.outputs.FLUTTER_VERSION }} | |
| channel: stable | |
| - name: Align Melos SDK path | |
| run: | | |
| mkdir -p .fvm | |
| ln -sfn "$FLUTTER_ROOT" .fvm/flutter_sdk | |
| - name: Setup Melos | |
| uses: bluefireteam/melos-action@v3 | |
| - name: Install dependencies | |
| run: fvm flutter pub get | |
| - name: Build Runner | |
| run: melos run build_runner:build | |
| timeout-minutes: 5 | |
| - name: Build SuperDeck Assets | |
| run: | | |
| cd demo | |
| fvm dart run superdeck_cli:main build | |
| timeout-minutes: 5 | |
| - name: Build Web App | |
| run: | | |
| cd demo | |
| fvm flutter build web --release | |
| timeout-minutes: 10 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| - name: Install E2E dependencies | |
| run: | | |
| cd demo/e2e | |
| npm ci | |
| - name: Install Playwright browsers | |
| timeout-minutes: 10 | |
| run: | | |
| cd demo/e2e | |
| npx playwright install --with-deps chromium webkit | |
| - name: Run Playwright smoke tests | |
| timeout-minutes: 5 | |
| run: | | |
| cd demo/e2e | |
| npm run test:smoke |