forked from Sylius/Sylius
-
Notifications
You must be signed in to change notification settings - Fork 0
114 lines (106 loc) · 4.67 KB
/
ci__full_2_0.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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
name: Continuous Integration 2.0 (Full)
on:
schedule:
-
cron: "0 3 * * *" # Run every day at 3am
workflow_dispatch: ~
concurrency:
group: ci-${{ github.workflow }}-${{ github.ref }}-2_0-full
cancel-in-progress: true
permissions:
contents: read
jobs:
static-checks:
strategy:
matrix:
branch: ["2.0"]
name: "[${{ matrix.branch }}] Static checks"
uses: ./.github/workflows/ci_static-checks.yaml
with:
branch: ${{ matrix.branch }}
type: full
e2e-mariadb:
strategy:
matrix:
branch: ["2.0"]
name: "[${{ matrix.branch }}] End-to-end tests (MariaDB)"
needs: static-checks
uses: ./.github/workflows/ci_e2e-mariadb.yaml
with:
branch: ${{ matrix.branch }}
type: full
e2e-mysql:
strategy:
matrix:
branch: ["2.0"]
name: "[${{ matrix.branch }}] End-to-end tests (MySQL)"
needs: static-checks
uses: ./.github/workflows/ci_e2e-mysql.yaml
with:
branch: ${{ matrix.branch }}
type: full
e2e-pgsql:
strategy:
matrix:
branch: ["2.0"]
name: "[${{ matrix.branch }}] End-to-end tests (PostgreSQL)"
needs: static-checks
uses: ./.github/workflows/ci_e2e-pgsql.yaml
with:
branch: ${{ matrix.branch }}
type: full
frontend:
name: Frontend
needs: static-checks
uses: ./.github/workflows/ci_frontend.yaml
with:
branch: ${{ matrix.branch }}
type: full
packages:
strategy:
matrix:
branch: ["2.0"]
name: "[${{ matrix.branch }}] Packages"
needs: static-checks
uses: ./.github/workflows/ci_packages.yaml
with:
branch: ${{ matrix.branch }}
type: full
notify-about-build-status:
if: ${{ always() }}
name: "Notify about build status"
needs: [static-checks, e2e-mariadb, e2e-mysql, e2e-pgsql, packages]
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: "Process data"
id: process-data
shell: bash
run: |
echo "branch=$(echo ${{ github.ref }} | sed 's/refs\/heads\///g' | sed 's/refs\/tags\///g')" >> $GITHUB_OUTPUT
echo "sha=$(echo ${{ github.sha }} | cut -c 1-12)" >> $GITHUB_OUTPUT
- name: "Notify on Slack"
uses: edge/simple-slack-notify@master
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
if: env.SLACK_WEBHOOK_URL != null
with:
channel: "#daily-build"
username: "GitHub Actions"
text: |
*<https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }} | ${{ github.workflow }} #${{ github.run_number }} build on ${{ github.repository }} repository has been completed for ${{ steps.process-data.outputs.branch }} branch.>*
${{ needs.static-checks.result == 'success' && ':+1:' || ':x:' }} Static Checks
${{ needs.e2e-mariadb.result == 'success' && ':+1:' || ':x:' }} End-to-End (MariaDB)
${{ needs.e2e-mysql.result == 'success' && ':+1:' || ':x:' }} End-to-End (MySQL)
${{ needs.e2e-pgsql.result == 'success' && ':+1:' || ':x:' }} End-to-End (PostgreSQL)
${{ needs.packages.result == 'success' && ':+1:' || ':x:' }} Packages
_ _ _ _ _ _ _
color: "danger"
fields: |
[
{ "title": "Repository", "value": "<https://github.com/${{ github.repository }} | ${{ github.repository }}>", "short": true },
{ "title": "Action", "value": "<https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }} | ${{ github.workflow }} #${{ github.run_number }}>", "short": true },
{ "title": "Reference", "value": "<https://github.com/${{ github.repository }}/tree/${{ steps.process-data.outputs.branch }} | ${{ steps.process-data.outputs.branch }}>", "short": true },
{ "title": "Commit", "value": "<https://github.com/${{ github.repository }}/commit/${{ github.sha }} | ${{ steps.process-data.outputs.sha }}>", "short": true },
{ "title": "Event", "value": "${{ github.event_name }}", "short": true }
]