Nightly Build #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: Nightly Build | |
| on: | |
| schedule: | |
| - cron: '0 0 * * *' # Runs daily at midnight UTC | |
| workflow_dispatch: # Allows manual triggering of the workflow | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| branch: | |
| - main | |
| - sample-code/start-here | |
| - sample-code/module-3-my-first-playwright-test | |
| - sample-code/module-4-interacting-with-elements | |
| - sample-code/module-5-refactoring | |
| - sample-code/module-6-browser-options | |
| - sample-code/module-7-browser-contexts | |
| - sample-code/module-8-live-coding-demo | |
| - sample-code/module-8-locators | |
| - sample-code/module-9-forms | |
| - sample-code/module-10-assertions | |
| - sample-code/module-11-waits | |
| - sample-code/module-12-api-interactions | |
| - sample-code/module-12-mocking-api-calls | |
| - sample-code/module-13-page-objects | |
| - sample-code/module-14-allure-reporting | |
| - sample-code/module-14-organizing-your-tests | |
| - sample-code/module-14-tracing | |
| - sample-code/module-15-parallel-execution | |
| - sample-code/module-15-parallel-execution-annotated | |
| - sample-code/module-16-allure-reporting | |
| - sample-code/module-17-cucumber | |
| - sample-code/module-20-docker-start | |
| - sample-code/module-20-docker | |
| - sample-code/end-to-end | |
| steps: | |
| # Step 1: Check out the repository code for the specific branch | |
| - name: Checkout repository | |
| uses: actions/checkout@v3 | |
| with: | |
| ref: ${{ matrix.branch }} | |
| # Step 2: Set up Node.js | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v3 | |
| with: | |
| node-version: '20' | |
| # Step 3: Set up JDK 17 | |
| - name: Set up JDK 17 | |
| uses: actions/setup-java@v3 | |
| with: | |
| java-version: '17' | |
| distribution: 'adopt' | |
| # Step 4: Install Maven 3.9.9 | |
| - name: Setup Maven Action | |
| uses: s4u/[email protected] | |
| with: | |
| checkout-fetch-depth: 0 | |
| java-version: 17 | |
| java-distribution: temurin | |
| maven-version: 3.9.9 | |
| # Step 5: Verify Maven installation | |
| - name: Verify Maven version | |
| run: mvn --version | |
| # Step 6: Cache Maven dependencies | |
| - name: Cache Maven dependencies | |
| uses: actions/cache@v3 | |
| with: | |
| path: ~/.m2 | |
| key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} | |
| restore-keys: | | |
| ${{ runner.os }}-maven | |
| # Step 7: Install Playwright dependencies | |
| - name: Install Playwright dependencies | |
| run: npx playwright install-deps | |
| # Step 8: Run Maven to execute Playwright tests | |
| - name: Run Playwright Tests | |
| run: mvn verify |