Skip to content

Commit

Permalink
MAPAPPS-7318 setup github action
Browse files Browse the repository at this point in the history
  • Loading branch information
andrfra committed Jan 7, 2025
1 parent 570d633 commit 9890eee
Showing 1 changed file with 94 additions and 0 deletions.
94 changes: 94 additions & 0 deletions .github/workflows/playwright-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
name: run playwright tests

on:
push:
branches: [ "dev-playwright" ]
pull_request:
branches: [ "dev-playwright" ]

jobs:
build:
runs-on: ubuntu-latest
steps:
- id: checkout
uses: actions/checkout@v4
- id: cache-node
name: Cache node modules
uses: actions/cache@v3
with:
path: |
'**/node'
'**/node_modules'
~/.m2/repository
key: ${{ runner.os }}-node_modules-${{ hashFiles('**/package.json') }}
- id: setup
name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'adopt'
- id: create_settings_xml
name: Create settings.xml
uses: whelk-io/maven-settings-xml-action@v22
with:
repositories: >
[
{
"id": "central",
"url": "http://central",
"releases": {
"enabled": "true"
},
"snapshots": {
"enabled": "true"
}
}
]
plugin_repositories: >
[
{
"id": "central",
"url": "http://central",
"releases": {
"enabled": "true"
},
"snapshots": {
"enabled": "true"
}
}
]
servers: >
[
{
"id": "${{ secrets.NEXUS_ID }}",
"username": "${{ secrets.NEXUS_USER }}",
"password": "${{ secrets.NEXUS_USER_PW }}"
}
]
mirrors: >
[
{
"id": "${{ secrets.NEXUS_ID }}",
"mirrorOf": "central",
"url": "${{ secrets.NEXUS_URL }}"
}
]
- id: tests
name: Run tests
run: mvn prepare-package -B -ntp -Prun-js-tests,include-mapapps-deps
shell: bash
- uses: actions/setup-node@v4
with:
node-version: lts/*
- name: Install dependencies
run: npm ci
- name: Install Playwright Browsers
run: npx playwright install --with-deps chromium
- name: Run Playwright tests
run: npx playwright test
- uses: actions/upload-artifact@v4
if: ${{ !cancelled() }}
with:
name: playwright-report
path: ./target/e2e-tests-reports
retention-days: 10

0 comments on commit 9890eee

Please sign in to comment.