-
Notifications
You must be signed in to change notification settings - Fork 31
76 lines (67 loc) · 2.22 KB
/
app-test-suite.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
name: Apps Test Suite
on:
pull_request: {}
jobs:
changed-files:
name: Generate matrix
runs-on: ubuntu-latest
outputs:
changed-apps: ${{ steps.changed-apps.outputs.changed-apps }}
change-count: ${{ steps.changed-apps.outputs.change-count }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Get changed files
id: changed-files-json
uses: tj-actions/changed-files@v44
with:
json: true
write_output_files: true
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: Matrix Output
id: changed-apps
run: |
out=$(python3 .github/scripts/changed_apps.py)
echo "changed-apps=${out}" >> $GITHUB_OUTPUT
echo "change-count=$(echo "${out}" | jq -r '.include | length')" >> $GITHUB_OUTPUT
- name: Message Generation
id: message
run: |
python3 .github/scripts/message.py > pr-comment.txt
if [ "$(cat pr-comment.txt)" != "" ]; then
echo "message=true" >> $GITHUB_OUTPUT
else
echo "message=false" >> $GITHUB_OUTPUT
fi
- name: Comment PR
uses: thollander/actions-comment-pull-request@v3
if: steps.message.outputs.message == 'true'
continue-on-error: true
with:
comment-tag: notify-teams
file-path: pr-comment.txt
run-apps:
name: Run Docker Compose Render/Install
needs: changed-files
runs-on: ubuntu-latest
if: needs.changed-files.outputs.change-count > 0
strategy:
matrix: ${{ fromJson(needs.changed-files.outputs.changed-apps) }}
fail-fast: false
max-parallel: 10
steps:
- name: Environment Information
run: |
echo "====== Docker Info ======"
docker info
echo "========================="
- name: Checkout
uses: actions/checkout@v4
- name: Test
shell: bash
run: |
echo "Testing [${{matrix.train}}/${{matrix.app}}/templates/test_values/${{matrix.test_file}}]"
python3 ./.github/scripts/ci.py --train ${{matrix.train}} --app ${{matrix.app}} --test-file ${{matrix.test_file}}