fix(app): Bump dependencies (testcontainers & prepare for Rust Edition 2024, remove MongoDB) #121
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: test | |
on: | |
pull_request: | |
branches: | |
- master | |
- beta | |
- alpha | |
- development | |
permissions: | |
issues: write | |
jobs: | |
app-unit-tests: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Set up Rust | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
- name: Run cargo fmt --check | |
id: fmt | |
working-directory: ./clearing-house-app | |
run: | | |
cargo fmt --check >> "$GITHUB_OUTPUT" | |
- name: Run cargo clippy | |
id: clippy | |
working-directory: ./clearing-house-app | |
run: | | |
cargo clippy >> "$GITHUB_OUTPUT" | |
- name: Post results to PR | |
uses: actions/github-script@v7 | |
if: always() | |
with: | |
script: | | |
const fmtOutput = `\`\`\` | |
${{ steps.fmt.outputs.fmt_result }} | |
\`\`\``; | |
const clippyOutput = `\`\`\` | |
${{ steps.clippy.outputs.clippy_result }} | |
\`\`\``; | |
const body = ` | |
## "cargo fmt --check" Result: | |
${fmtOutput} | |
## "cargo clippy" Result: | |
${clippyOutput} | |
`; | |
github.rest.issues.createComment({ | |
issue_number: context.issue.number, | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
body: body | |
}); | |
edc-unit-tests: | |
runs-on: ubuntu-latest | |
permissions: | |
pull-requests: write | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Setup JDK 17 | |
uses: actions/setup-java@v2 | |
with: | |
java-version: '17' | |
distribution: 'temurin' | |
- name: Build Project | |
run: | | |
cd clearing-house-edc | |
./gradlew clean build \ | |
-Dorg.gradle.project.gitHubUserName=${{ github.actor }} \ | |
-Dorg.gradle.project.gitHubUserPassword=${{ secrets.GITHUB_TOKEN }} | |
- name: Run Unit Tests | |
run: | | |
cd clearing-house-edc | |
./gradlew test jacocoTestReport | |
- name: Add Coverage Report | |
id: jacoco | |
uses: madrapps/jacoco-report@v1.6.1 | |
with: | |
paths: | | |
${{ github.workspace }}/clearing-house-edc/core/build/reports/jacoco/test/jacocoTestReport.xml, | |
${{ github.workspace }}clearing-house-edc/extensions/multipart/build/reports/jacoco/test/jacocoTestReport.xml | |
token: ${{ secrets.GITHUB_TOKEN }} | |
min-coverage-overall: 70 | |
min-coverage-changed-files: 80 |