Skip to content

Updated github actions script #96

Updated github actions script

Updated github actions script #96

name: Playwright Tests
# Trigger the workflow on every push to any branch
on:
push:
branches:
- '**'
pull_request:
branches:
- '**'
jobs:
test:
runs-on: ubuntu-latest
steps:
# Step 1: Check out the repository code
- name: Checkout repository
uses: actions/checkout@v3
# Step 2: Set up JDK 17
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'adopt'
# Step 3: Install Maven 3.9.9
- name: Install Maven 3.9.9
run: |
wget https://downloads.apache.org/maven/maven-3/3.9.9/binaries/apache-maven-3.9.9-bin.tar.gz
tar -xvzf apache-maven-3.9.9-bin.tar.gz
sudo mv apache-maven-3.9.9 /opt/maven
echo "/opt/maven/bin" >> $GITHUB_PATH
# Step 4: Verify Maven installation
- name: Verify Maven version
run: mvn --version
# Step 5: 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 6: Run Maven to execute Playwright tests
- name: Run Playwright Tests
run: mvn verify