feat(dpp): add database provider plugins #9
Workflow file for this run
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: 'Check Pull Request for plugin: database provider' | |
| on: | |
| pull_request: | |
| types: [opened, synchronize, reopened] | |
| paths: | |
| - 'dpp/**' | |
| jobs: | |
| tests: | |
| name: Unit tests | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up JDK 21 for x64 | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: '21' | |
| distribution: 'temurin' | |
| architecture: x64 | |
| - name: Start PostgreSQL test database | |
| working-directory: dpp/src/test/fake-postgres-db | |
| run: | | |
| docker compose up -d | |
| sleep 5 | |
| - name: Install Pandoc | |
| run: sudo apt-get update && sudo apt-get install -y pandoc | |
| - name: Execute unit tests | |
| run: mvn -ntp -pl dpp test | |
| - name: Execute mutation tests | |
| run: mvn -ntp -pl dpp org.pitest:pitest-maven:mutationCoverage | |
| - name: Extract summary from pitest | |
| run: | | |
| echo "<html><head></head><body><h1>Pit Test Coverage Report: database-provider</h1><h3>Project Summary</h3>" > pitest.html | |
| perl -0777 -ne 'print "$1\n" if /(<table>.*?<\/table>)/s' dpp/target/pit-reports/index.html >> pitest.html | |
| echo "</body></html>" >> pitest.html | |
| - name: Convert pitest report to markdown | |
| run: pandoc --from html --to markdown_github --no-highlight pitest.html | |
| - name: Post comment | |
| uses: luukkemp/pr-comment@2024.1 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| path: pitest.html |