Skip to content

Clean up code

Clean up code #37

Workflow file for this run

name: Test Coverage
on:
workflow_dispatch:
push:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions: read-all
jobs:
build-test-coverage:
name: Run coverage tests and publish results
runs-on: ubuntu-latest
steps:
# SETUP BUILD ENVIRONMENT
- id: prepare-maven-build
name: Prepare Maven build
uses: sualeh/[email protected]
with:
java-version: 11
- id: install-graphviz
name: Install Graphviz
uses: sualeh/[email protected]
# BUILD AND TEST
- id: build-test
name: Coverage tests
shell: bash
run: |
# Run coverage tests
mvn \
--no-transfer-progress \
--batch-mode \
-Dtestcoverage \
clean install
# GET TEST RESULTS
- id: publish-coverage-codecov
name: Upload coverage report to Codecov
if: contains(github.ref, 'main')
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
verbose: true
- id: publish-coverage-codacy
name: Upload coverage report to Codacy
uses: codacy/codacy-coverage-reporter-action@v1
if: contains(github.ref, 'main')
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CODACY_ORGANIZATION_PROVIDER: gh
CODACY_USERNAME: schemacrawler
CODACY_PROJECT_NAME: SchemaCrawler
CODACY_API_TOKEN: ${{ secrets.CODACY_API_TOKEN }}
with:
api-token: ${{ secrets.CODACY_API_TOKEN }}
- id: upload-coverage-test-results
name: Upload coverage test results
uses: actions/upload-artifact@v3
if: contains(github.ref, 'main')
with:
name: jacoco-coverage-test-results
path: ./target/schemacrawler-jacoco.exec
retention-days: 5