Merge pull request #227 from schemacrawler/dependabot/maven/software.… #471
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: Quick Build | |
on: | |
workflow_dispatch: | |
push: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
build: | |
name: Quick build | |
runs-on: ubuntu-latest | |
# Service containers to run with workflow | |
services: | |
swagger-editor: | |
image: swaggerapi/swagger-editor | |
ports: | |
- 80:8080 | |
steps: | |
# SETUP BUILD ENVIRONMENT | |
- id: prepare-maven-build | |
name: Prepare Maven build | |
uses: sualeh/prepare-maven-build@v1.3.3 | |
with: | |
java-version: 17 | |
- id: install-packages | |
name: Install packages | |
shell: bash | |
run: | | |
# Install Graphviz | |
sudo apt-get -qq update | |
sudo apt-get -q install graphviz | |
dot -V | |
# VALIDATE OPENAPI SPECIFICATION | |
- id: validate-oas | |
name: Validate OpenAPI definition | |
uses: char0n/swagger-editor-validate@v1.3.2 | |
with: | |
swagger-editor-url: http://localhost/ | |
definition-file: src/main/resources/api/schemacrawler-web-application.yaml | |
# BUILD AND TEST | |
- id: build-test | |
name: Build and run tests | |
shell: bash | |
run: | | |
# Build | |
mvn \ | |
--no-transfer-progress \ | |
--batch-mode \ | |
package | |
- id: publish-test-results | |
name: Upload results and coverage | |
if: contains(github.ref, 'main') | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
CODECOV_TOKEN: 350b716c-8f65-451b-b438-072f0662637d | |
shell: bash | |
run: | | |
bash <(curl -s https://codecov.io/bash) |