-
Notifications
You must be signed in to change notification settings - Fork 0
93 lines (89 loc) · 3.02 KB
/
convincing.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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
---
name: Convincing
on:
pull_request:
branches:
- main
workflow_dispatch:
env:
IMAGE_NAME: stack/gear
jobs:
up-to-images:
name: Up to images (${{ matrix.env.dev }})
timeout-minutes: 10
permissions:
checks: write
packages: write
strategy:
fail-fast: false
matrix:
env:
- dev: turing
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- name: Run setup-gear
uses: ./.github/actions/setup-gear
with:
devenv: ${{ matrix.env.dev }}
token: ${{ secrets.GITHUB_TOKEN }}
- name: Run setup-maven
uses: ./.github/actions/setup-maven
- name: Run ansible-playbook sources.yaml
run: >-
docker run --rm
--volume $(pwd):$(pwd)
--volume ~/.m2:/root/.m2
--workdir $(pwd)/bakers/ansible
${{ env.IMAGE_NAME }}:${{ matrix.env.dev }}
ansible-playbook sources.yaml
-e devenv=${{ matrix.env.dev }}
- name: Run ansible-playbook images.yaml
id: images
run: >-
docker run --rm
--volume $(pwd):$(pwd)
--volume ~/.m2:/root/.m2
--volume /var/run/docker.sock:/var/run/docker.sock
--volume ~/.docker/config.json:/root/.docker/config.json:ro
--env GITHUB_ACTOR=${{ github.actor }}
--env GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }}
--workdir $(pwd)/bakers/ansible
${{ env.IMAGE_NAME }}:${{ matrix.env.dev }}
ansible-playbook images.yaml -v
-e devenv=${{ matrix.env.dev }}
-e binary_storage=maven.pkg.github.com
-e image_storage=ghcr.io
- uses: mikepenz/[email protected]
if: ${{ !cancelled() && (steps.images.outcome == 'success' || steps.images.outcome == 'failure') }}
with:
check_name: Unit test report
report_paths: "**/target/surefire-reports/TEST-*.xml"
require_tests: "${{ steps.images.outcome == 'failure' }}"
fail_on_failure: false
job_summary: false
- uses: mikepenz/[email protected]
if: ${{ !cancelled() && (steps.images.outcome == 'success' || steps.images.outcome == 'failure') }}
with:
check_name: Integration test report
report_paths: "**/target/failsafe-reports/TEST-*.xml"
require_tests: "${{ steps.images.outcome == 'failure' }}"
fail_on_failure: false
job_summary: false
- uses: actions/[email protected]
if: ${{ !cancelled() }}
with:
name: test-coverage-report
path: tools/target/coverage
if-no-files-found: ignore
everything-is-fine:
name: Everything is fine
needs: [up-to-images]
runs-on: ubuntu-latest
timeout-minutes: 10
if: ${{ always() }}
steps:
- if: ${{ contains(needs.*.result, 'failure') || contains(needs.*.result, 'skipped') || contains(needs.*.result, 'cancelled') }}
run: |
echo "::error::Something went wrong"
exit 1