-
Notifications
You must be signed in to change notification settings - Fork 14
61 lines (60 loc) · 1.71 KB
/
build_workflow.yaml
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
60
61
# This file was generated using Kotlin DSL (.github/workflows/build_workflow.main.kts).
# If you want to modify the workflow, please change the Kotlin file and regenerate this YAML file.
# Generated with https://github.com/typesafegithub/github-workflows-kt
name: 'Build workflow'
on:
push:
branches:
- 'main'
pull_request: {}
jobs:
check_yaml_consistency:
name: 'Check YAML consistency'
runs-on: 'ubuntu-latest'
steps:
- id: 'step-0'
name: 'Check out'
uses: 'actions/checkout@v4'
- id: 'step-1'
name: 'Execute script'
run: 'rm ''.github/workflows/build_workflow.yaml'' && ''.github/workflows/build_workflow.main.kts'''
- id: 'step-2'
name: 'Consistency check'
run: 'git diff --exit-code ''.github/workflows/build_workflow.yaml'''
build-and-test:
runs-on: 'ubuntu-latest'
permissions:
checks: 'write'
needs:
- 'check_yaml_consistency'
steps:
- id: 'step-0'
name: 'Check out'
uses: 'actions/checkout@v4'
- id: 'step-1'
name: 'Setup Java'
uses: 'actions/setup-java@v4'
with:
java-version: '17'
distribution: 'temurin'
- id: 'step-2'
name: 'Build'
uses: 'gradle/gradle-build-action@v3'
with:
arguments: 'test'
- id: 'step-3'
name: 'Upload reports'
uses: 'actions/upload-artifact@v4'
with:
name: 'Roborazzi'
path: 'shared/build/outputs/roborazzi'
retention-days: '0'
if: '${{ always() }}'
- id: 'step-4'
name: 'Upload test reports'
uses: 'actions/upload-artifact@v4'
with:
name: 'Junit'
path: '**/build/reports/tests'
retention-days: '0'
if: '${{ always() }}'