change #388
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: On push, any branch | |
on: [push] | |
jobs: | |
run-script-server-test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up JDK 11 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '11' | |
distribution: 'adopt' | |
- name: Validate Gradle wrapper | |
uses: gradle/wrapper-validation-action@v1 | |
- name: Gradle build & test | |
uses: gradle/gradle-build-action@v2 | |
with: | |
arguments: build --info | |
build-root-directory: script-server | |
- name: Save test results | |
uses: actions/upload-artifact@v3 | |
if: always() | |
with: | |
name: Test results | |
path: script-server/build/reports/tests/test/ | |
run-yml-validation: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: YML file syntax validation | |
uses: navikt/yaml-validator@v4 | |
with: | |
schema_path: scripts/cerberusValidationSchema | |
document_path: scripts | |
validate_file_extension: no | |
filter_extensions: .yml | |
- name: YML test files syntax validation | |
uses: navikt/yaml-validator@v4 | |
with: | |
schema_path: scripts/cerberusValidationSchema | |
document_path: script-server/src/test/resources/scripts/ | |
validate_file_extension: no | |
filter_extensions: .yml | |
- name: Find duplicate lines inside same step YML file | |
working-directory: ./scripts | |
run: ../.github/findDuplicateDescriptions.sh | |
shell: bash | |
- name: Find duplicate lines inside same pipeline JSON file | |
working-directory: ./pipelines | |
run: ../.github/findDuplicateIds.sh | |
shell: bash |