Skip to content

build: run weasyprint integration tests during build process #42

build: run weasyprint integration tests during build process

build: run weasyprint integration tests during build process #42

Workflow file for this run

---
name: maven-release
on:
push:
branches: ['**/**']
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v4
- name: Set up JDK and Maven
uses: actions/setup-java@v4
with:
distribution: adopt
java-version: 17
cache: maven
- uses: whelk-io/maven-settings-xml-action@v22
with:
repositories: >
[
{
"id": "s3",
"name": "s3.sbb.polarion.maven.repo",
"url": "s3://sbb-polarion-maven-repo/polarion.mvn",
"releases": {
"enabled": "true",
"updatePolicy": "never"
}
}
]
profiles: >
[
{
"id": "githubDeploy",
"properties":
{
"altDeploymentRepository": "github::default::https://maven.pkg.github.com/${{ github.repository }}"
}
}
]
servers: >
[
{
"id": "s3",
"username": "${{ secrets.S3_SBB_POLARION_MAVEN_REPO_RW_ACCESS_KEY }}",
"password": "${{ secrets.S3_SBB_POLARION_MAVEN_REPO_RW_SECRET_ACCESS_KEY }}"
},
{
"id": "github",
"username": "${env.GITHUB_ACTOR}",
"password": "${env.GITHUB_TOKEN}"
}
]
- name: Print settings.xml
run: cat /home/runner/.m2/settings.xml
- name: Build with Maven
run: mvn --batch-mode clean package -P polarion2404,install-weasyprint,tests-with-weasyprint-cli
- name: Upload Artifacts
if: always()
uses: actions/upload-artifact@v4
with:
name: test images
path: target/surefile-reports/**/*.png
retention-days: 1
- name: Extract artefact version
id: artefact_version
run: echo "version=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)" >> $GITHUB_OUTPUT
- name: Publish to GitHub Packages
if: ${{ !endsWith(steps.artefact_version.outputs.version, '-SNAPSHOT') }}
run: mvn --batch-mode deploy -PgithubDeploy
env:
GITHUB_TOKEN: ${{ github.token }}