Skip to content

Update sync-master-develop.yml #252

Update sync-master-develop.yml

Update sync-master-develop.yml #252

Workflow file for this run

name: Tests
on: push
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
java: [8, 11, 17]
timeout-minutes: 5
steps:
- uses: actions/checkout@v4
- name: Set up JDK ${{ matrix.java }}
uses: actions/setup-java@v4
with:
java-version: ${{ matrix.java }}
distribution: "temurin"
- name: Cache npm dependencies
uses: actions/cache@v4
id: npm-cache
with:
path: "**/node_modules"
key: npm-cache-v1-${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
npm-cache-v1-${{ runner.os }}-
- name: Cache Maven dependencies
uses: actions/cache@v4
id: maven-cache
with:
path: ~/.m2/repository
key: maven-cache-v1-${{ runner.os }}-${{ hashFiles('**/pom.xml') }}-${{ matrix.java }}
restore-keys: |
maven-cache-v1-${{ runner.os }}-${{ matrix.java }}
- name: Install Maven dependencies
# https://github.com/actions/cache#skipping-steps-based-on-cache-hit
if: steps.maven-cache.outputs.cache-hit != 'true'
run: mvn clean install -DskipTests
- name: Install NPM dependencies
# https://github.com/actions/cache#skipping-steps-based-on-cache-hit
if: steps.npm-cache.outputs.cache-hit != 'true'
run: |
npm ci &&
npm --prefix=selenium ci &&
npm --prefix=playwright ci
license-check:
needs: build
runs-on: ubuntu-latest
timeout-minutes: 2
steps:
- uses: actions/checkout@v4
- name: Maven compile licenses
run: mvn compile license:add-third-party
- name: Check Selenium licenses
run: node scripts/license-check.js selenium/target/generated-sources/license/THIRD-PARTY.txt
- name: Check Playwright licenses
run: node scripts/license-check.js playwright/target/generated-sources/license/THIRD-PARTY.txt
playwright-tests:
needs: [license-check, build]
runs-on: ubuntu-latest
timeout-minutes: 5
strategy:
matrix:
java: [8, 11, 17]
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
name: Restore npm cache
id: npm-cache
with:
path: "**/node_modules"
key: npm-cache-v1-${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
npm-cache-v1-${{ runner.os }}-
- uses: actions/cache@v4
name: Restore Maven cache
id: maven-cache
with:
path: ~/.m2/repository
key: maven-cache-v1-${{ runner.os }}-${{ hashFiles('**/pom.xml') }}-${{ matrix.java }}
restore-keys: |
maven-cache-v1-${{ runner.os }}-${{ matrix.java }}
- name: Start fixture server
run: npm --prefix=playwright start &
- name: Run Playwright tests
run: mvn test -q -pl playwright
selenium-tests:
needs: [license-check, build]
runs-on: ubuntu-latest
timeout-minutes: 5
strategy:
matrix:
java: [8, 11, 17]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- uses: actions/cache@v4
name: Restore npm cache
id: npm-cache
with:
path: "**/node_modules"
key: npm-cache-v1-${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
npm-cache-v1-${{ runner.os }}-
- uses: actions/cache@v4
name: Restore Maven cache
id: maven-cache
with:
path: ~/.m2/repository
key: maven-cache-v1-${{ runner.os }}-${{ hashFiles('**/pom.xml') }}-${{ matrix.java }}
restore-keys: |
maven-cache-v1-${{ runner.os }}-${{ matrix.java }}
- name: Start fixture server
run: python -m http.server 8001 &
working-directory: selenium/node_modules/axe-test-fixtures/fixtures
- name: Run Selenium tests
run: mvn test -q -pl selenium