Nightly Build #3
This file contains 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 | ||
name: Build (${{matrix.branch | replace('sample-code/', '')}}) | ||
Check failure on line 40 in .github/workflows/nightly-build.yml
|
||
steps: | ||
# Check out the repository code for the specific branch | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
ref: ${{ matrix.branch }} | ||
# Check out the branch | ||
- name: Fetch specific branch | ||
run: git fetch origin ${{ matrix.branch }} && git checkout ${{ matrix.branch }} | ||
# List contents of the test directory | ||
- name: List test files | ||
run: | | ||
echo "Current branch: ${{ matrix.branch }}" | ||
echo "Test cases:" | ||
ls -R src/test/java/com/serenitydojo/playwright | ||
# Set up Node.js | ||
- name: Set up Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: '20' | ||
# Set up JDK 17 | ||
- name: Set up JDK 17 | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: '17' | ||
distribution: 'adopt' | ||
# Install Maven 3.9.9 | ||
- name: Setup Maven Action | ||
uses: s4u/setup-maven-action@v1.7.0 | ||
with: | ||
checkout-fetch-depth: 0 | ||
java-version: 17 | ||
java-distribution: temurin | ||
maven-version: 3.9.9 | ||
# Verify Maven installation | ||
- name: Verify Maven version | ||
run: mvn --version | ||
# ache Maven dependencies | ||
- name: Cache Maven dependencies | ||
uses: actions/cache@v3 | ||
with: | ||
path: ~/.m2 | ||
key: ${{ runner.os }}-maven-${{ matrix.branch }}-${{ hashFiles('**/pom.xml') }} | ||
restore-keys: | | ||
${{ runner.os }}-maven | ||
# Install Playwright dependencies | ||
- name: Install Playwright dependencies | ||
run: npx playwright install-deps | ||
# Run Maven to execute Playwright tests | ||
- name: Run Playwright Tests | ||
run: mvn verify |