Prepare new development branch release-5.6.x #2
This file contains 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: Build and test the project | ||
on: | ||
workflow_call: | ||
secrets: | ||
SONAR_TOKEN: | ||
required: true | ||
<<<<<<< HEAD | ||
SSH_TESTING_SERVER_HOST: | ||
required: true | ||
SSH_TESTING_SERVER_PORT: | ||
required: true | ||
SSH_TESTING_SERVER_USER: | ||
required: true | ||
SSH_TESTING_SERVER_PASSWORD: | ||
required: true | ||
inputs: | ||
report_dir: | ||
type: string | ||
required: true | ||
report_context: | ||
type: string | ||
required: true | ||
env: | ||
xb_version: "1.6.0" | ||
======= | ||
>>>>>>> release-5.6.x | ||
jobs: | ||
test: | ||
name: Test and push Sonar analysis | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: '0' | ||
- name: Set up JDK 11 | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: 'temurin' | ||
java-version: '11' | ||
cache: 'maven' | ||
- name: Start MongoDB v6.0 | ||
uses: supercharge/mongodb-github-action@1.8.0 | ||
with: | ||
mongodb-version: 6.0 | ||
mongodb-replica-set: rs-test | ||
- name: Install dependencies branches | ||
run: | | ||
if [ -f "./.github/workflows/scripts/get_same_branch.sh" ]; then | ||
chmod +x ./.github/workflows/scripts/get_same_branch.sh | ||
./.github/workflows/scripts/get_same_branch.sh ${{ github.ref_name }} | ||
else | ||
echo "./.github/workflows/scripts/get_same_branch.sh does not exist." | ||
fi | ||
- name: Test and Analyze | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any | ||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | ||
run: mvn -B verify surefire-report:report --fail-never -Dcheckstyle.skip org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=opencb_cellbase | ||
- name: Publish Test Report | ||
uses: scacap/action-surefire-report@v1 | ||
## Skip cancelled() | ||
## https://docs.github.com/en/actions/learn-github-actions/expressions#cancelled | ||
if: success() || failure() | ||
with: | ||
check_name: "Surefire tests report" | ||
report_paths: './**/surefire-reports/TEST-*.xml' | ||
commit: '${{ github.sha }}' | ||
fail_on_test_failures: true |