Tests: Setup Playwright #1
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: Playwright | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - "v*.*" | |
| pull_request: | |
| branches: | |
| - main | |
| jobs: | |
| test: | |
| timeout-minutes: 60 | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install inotify-tools | |
| run: sudo apt-get update && sudo apt-get install -y inotify-tools | |
| - name: Set up Elixir | |
| uses: erlef/[email protected] | |
| with: | |
| elixir-version: "1.19.1" # [Required] Define the Elixir version | |
| otp-version: "28.1.1" # [Required] Define the Erlang/OTP version | |
| - name: Cache Mix | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| deps | |
| _build | |
| key: ${{ runner.os }}-mix-${{ hashFiles('**/mix.lock') }} | |
| restore-keys: ${{ runner.os }}-mix- | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: lts/* | |
| - name: Install Dependencies | |
| run: mix deps.get | |
| - name: Setup playwright tests | |
| run: mix e2e_playwright.setup | |
| - name: Run Playwright tests | |
| run: mix e2e_playwright | |
| - uses: actions/upload-artifact@v4 | |
| if: ${{ !cancelled() }} | |
| with: | |
| name: playwright-report | |
| path: playwright-report/ | |
| retention-days: 1 |