Feat : add screens to plugin (media) #364
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: PluginBuilder Tests | |
| on: | |
| push: | |
| branches: [ "master" ] | |
| pull_request: | |
| branches: [ "master" ] | |
| permissions: | |
| contents: read | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| env: | |
| CI: true | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Setup .NET 10 | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: 10.0.x | |
| - name: Build solution | |
| run: dotnet build --configuration Release | |
| - name: Cache Playwright browsers | |
| uses: actions/cache@v4 | |
| id: playwright-cache | |
| with: | |
| path: ~/.cache/ms-playwright | |
| key: ${{ runner.os }}-playwright-${{ hashFiles('**/PluginBuilder.Tests.csproj') }} | |
| restore-keys: | | |
| ${{ runner.os }}-playwright- | |
| - name: Install Playwright CLI + browsers (full install) | |
| if: steps.playwright-cache.outputs.cache-hit != 'true' | |
| run: | | |
| dotnet tool install --global Microsoft.Playwright.CLI | |
| export PATH="$PATH:$HOME/.dotnet/tools" | |
| playwright install --with-deps | |
| - name: Install Playwright CLI only (cache hit) | |
| if: steps.playwright-cache.outputs.cache-hit == 'true' | |
| run: | | |
| dotnet tool install --global Microsoft.Playwright.CLI | |
| export PATH="$PATH:$HOME/.dotnet/tools" | |
| - name: Start Docker containers | |
| env: | |
| # Enable BuildKit for faster builds and better layer caching within the run | |
| # Note: This does NOT persist cache between GitHub Actions runs (ephemeral runners) | |
| # but provides ~5-10s speed improvement from BuildKit's optimized build engine | |
| DOCKER_BUILDKIT: 1 | |
| COMPOSE_DOCKER_CLI_BUILD: 1 | |
| run: docker compose -f PluginBuilder.Tests/docker-compose.yml up -d --build | |
| - name: Build plugin-builder image once | |
| env: | |
| DOCKER_BUILDKIT: 1 | |
| run: docker build -f PluginBuilder/PluginBuilder.Dockerfile -t plugin-builder PluginBuilder | |
| - name: Run tests | |
| env: | |
| DOCKER_STARTUP_SKIP_BUILD: "true" | |
| GITHUB_TOKEN: ${{ github.token }} | |
| run: dotnet test PluginBuilder.Tests --verbosity normal | |
| - name: Cleanup Docker | |
| if: always() | |
| run: docker compose -f PluginBuilder.Tests/docker-compose.yml down --volumes |