Skip to content

feat: poc mongo

feat: poc mongo #261

Workflow file for this run

name: Thou shall not pass !!! (Check version & run tests)
on:
pull_request:
types: [opened, synchronize, reopened]
jobs:
check-version:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Get version
id: version
run: |
if [[ "${{ github.base_ref }}" == "main" ]]; then
echo "version=$(mvn -f pom.xml help:evaluate -Dexpression=project.version -q -DforceStdout)" >> $GITHUB_OUTPUT
else
echo "version=$(mvn -f pom.xml help:evaluate -Dexpression=project.version -q -DforceStdout)-SNAPSHOT" >> $GITHUB_OUTPUT
fi
- name: Print version
run: echo ${{ steps.version.outputs.version }}
- uses: mukunku/[email protected]
name: Check tag existence
id: check-tag-exists
with:
tag: ${{ steps.version.outputs.version }}
- name: Tag verification
id: check-tag
run: |
if [[ "${{ steps.check-tag-exists.outputs.exists }}" == "true" ]]; then
echo "Tag ${{ steps.version.outputs.version }} already exists, don't forget to upgrade your pom"
exit 1
fi
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '21'
- name: Running tests
run: mvn test --no-transfer-progress