Workflow file for this run
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: SchemaCrawler Job to Lint Database Schema | |
on: [push] | |
jobs: | |
schemacrawler-job: | |
runs-on: ubuntu-latest | |
name: SchemaCrawler Job to Lint Database Schema | |
steps: | |
- id: checkout | |
name: Checkout repository | |
uses: actions/checkout@v3 | |
- id: schemacrawler | |
name: Run SchemaCrawler Action with specified command-line | |
uses: schemacrawler/[email protected] | |
with: | |
entrypoint: /schemacrawler.sh | |
args: --server=sqlite --database=schemacrawler.sqlite --user:env USER --password:env PASSWORD --info-level=standard --command=lint --linter-configs /schemacrawler-linter-configs.yaml --lint-dispatch=terminate_system --output-file lint-report.txt --log-level=FINE | |
env: | |
USER: user-possibly-from-secrets | |
PASSWORD: password-possibly-from-secrets | |
- id: upload-lint-report | |
name: Upload SchemaCrawler lint report | |
uses: actions/upload-artifact@v2 | |
with: | |
name: lint-report | |
path: lint-report.txt | |
- id: check-success | |
name: Fail the entire job if SchemaCrawler lint report has failures | |
run: | | |
[ ${{ env.SC_EXIT_STATUS }} -eq 0 ] && echo "SchemaCrawler lint check succeeded" || echo "SchemaCrawler lint check shows failures - see the lint report" | |
[ ${{ env.SC_EXIT_STATUS }} -eq 0 ] || exit 1 | |