Test #36
This file contains hidden or 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: Test | |
| on: | |
| schedule: | |
| - cron: '0 4 * * 0' | |
| workflow_dispatch: | |
| inputs: | |
| branch: | |
| description: 'Branch to use' | |
| type: string | |
| default: 'develop' | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| packages: write | |
| steps: | |
| - name: Checkout the code | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: "assimbly/runtime" | |
| ref: ${{ inputs.branch }} | |
| fetch-depth: 0 | |
| token: ${{ secrets.RELEASE_TOKEN }} | |
| - name: Set up JDK 21 | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: '21' | |
| distribution: 'temurin' | |
| - name: Setup Maven settings.xml | |
| uses: whelk-io/maven-settings-xml-action@v22 | |
| with: | |
| repositories: > | |
| [ | |
| { | |
| "id": "maven", | |
| "name": "Maven Central", | |
| "url": "https://repo1.maven.org/maven2" | |
| }, | |
| { | |
| "id": "github", | |
| "name": "Assimbly Base Repository", | |
| "url": "https://maven.pkg.github.com/assimbly/base", | |
| "snapshots": { | |
| "enabled": "true" | |
| } | |
| }, | |
| { | |
| "id": "aurea", | |
| "name": "Aurea Sonic Repository", | |
| "url": "https://int-factory.aurea.com/nexus/content/repositories/sonic-releases/" | |
| } | |
| ] | |
| servers: > | |
| [ | |
| { | |
| "id": "github", | |
| "username": "assimbly", | |
| "password": "${{ secrets.MAVEN_TOKEN }}" | |
| } | |
| ] | |
| - name: Test project | |
| run: mvn test | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.MAVEN_TOKEN }} | |
| - name: Post a Slack message in the backend dev channel | |
| if: failure() | |
| uses: slackapi/slack-github-action@v2.1.0 | |
| with: | |
| webhook: ${{ secrets.SLACK_WEBHOOK_URL_BACKEND_DEV }} | |
| webhook-type: incoming-webhook | |
| payload: | | |
| text: ":x: Runtime Test failed: <${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}>" | |
| blocks: | |
| - type: "section" | |
| text: | |
| type: "mrkdwn" | |
| text: ":x: Runtime Test failed: <${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}>" | |