forked from GEO-BON/bon-in-a-box-pipelines
-
Notifications
You must be signed in to change notification settings - Fork 2
59 lines (51 loc) · 1.6 KB
/
onPush.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
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