-
Notifications
You must be signed in to change notification settings - Fork 0
130 lines (125 loc) · 4.88 KB
/
model-test.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
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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
name: model-test
on: push
jobs:
model-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: actions/setup-python@v3
with:
python-version: '3.x'
cache: 'pip'
- uses: actions/setup-java@v3
with:
distribution: 'oracle'
java-version: '17'
- name: Launch model tests
run: |
pip install -r .acimov/model-test/requirements.txt
SUMMARY="$(python .acimov/model-test/complete-test.py --mode=actions --DEV_USERNAME=${{ github.actor }} --REPO_URI=${{ github.server_url }}/${{ github.repository }} --BRANCH=${{ github.ref_name }} --is-action)"
TOKENS=($SUMMARY)
echo "PASS=$(echo ${TOKENS[2]})" >> $GITHUB_ENV
echo "NOTTESTED=$(echo ${TOKENS[5]})" >> $GITHUB_ENV
echo "CANNOTTELL=$(echo ${TOKENS[8]})" >> $GITHUB_ENV
echo "MINORFAIL=$(echo ${TOKENS[11]})" >> $GITHUB_ENV
echo "MAJORFAIL=$(echo ${TOKENS[14]})" >> $GITHUB_ENV
echo "EL_LABEL=$(echo ${TOKENS[17]})" >> $GITHUB_ENV
echo "EL_COLOR=$(echo ${TOKENS[20]})" >> $GITHUB_ENV
echo "QL_LABEL=$(echo ${TOKENS[23]})" >> $GITHUB_ENV
echo "QL_COLOR=$(echo ${TOKENS[26]})" >> $GITHUB_ENV
echo "RL_LABEL=$(echo ${TOKENS[29]})" >> $GITHUB_ENV
echo "RL_COLOR=$(echo ${TOKENS[32]})" >> $GITHUB_ENV
REF=${{ github.ref }}
echo "github.ref: $REF"
IFS='/' read -ra PATHS <<< "$REF"
BRANCH_NAME="${PATHS[1]}_${PATHS[2]}"
echo $BRANCH_NAME
echo "BRANCH=$(echo ${BRANCH_NAME})" >> $GITHUB_ENV
echo "REPO=$(echo ${{ github.repository }} | cut -d'/' -f2)" >> $GITHUB_ENV
- name: Archive model test results
uses: actions/upload-artifact@v3
with:
name: model-test-report
path: .acimov/output/model-test-actions.md
- name: Commit the report
run: |
git config --global user.email "no-reply@github.com"
git config --global user.name "Github Actions"
git add .acimov/output/model-test-actions.ttl .acimov/output/model-test-actions.md README.md -f
git commit -m "Provide automatic model test report [skip actions]"
git remote set-url origin ${{ github.server_url }}/${{ github.repository }}
git push
- name: Create the Pass Badge
uses: schneegans/dynamic-badges-action@v1.7.0
with:
auth: ${{ secrets.GIST_SECRET }}
gistID: ecc76114da46334e44dc7c93634eecdb
filename: ${{ env.REPO }}__${{ env.BRANCH }}.json
label: Pass
message: ${{ env.PASS }}
color: Green
- name: Create the NotTested Badge
uses: schneegans/dynamic-badges-action@v1.7.0
with:
auth: ${{ secrets.GIST_SECRET }}
gistID: 49b9c637b24deb44e9a1d229af74cdc8
filename: ${{ env.REPO }}__${{ env.BRANCH }}.json
label: NotTested
message: ${{ env.NOTTESTED }}
color: White
- name: Create the CannotTell Badge
uses: schneegans/dynamic-badges-action@v1.7.0
with:
auth: ${{ secrets.GIST_SECRET }}
gistID: 75a02c6b20baf6cd4bc6ec4c2148fb21
filename: ${{ env.REPO }}__${{ env.BRANCH }}.json
label: CannotTell
message: ${{ env.CANNOTTELL }}
color: yellow
- name: Create the MinorFail Badge
uses: schneegans/dynamic-badges-action@v1.7.0
with:
auth: ${{ secrets.GIST_SECRET }}
gistID: 9a8586dfcd702f1511d18b5f81fd1594
filename: ${{ env.REPO }}__${{ env.BRANCH }}.json
label: MinorFail
message: ${{ env.MINORFAIL }}
color: orange
- name: Create the MajorFail Badge
uses: schneegans/dynamic-badges-action@v1.7.0
with:
auth: ${{ secrets.GIST_SECRET }}
gistID: a242e427a25c90887a3213049eb60af7
filename: ${{ env.REPO }}__${{ env.BRANCH }}.json
label: MajorFail
message: ${{ env.MAJORFAIL }}
color: red
- name: Create the OWL_EL Badge
uses: schneegans/dynamic-badges-action@v1.7.0
with:
auth: ${{ secrets.GIST_SECRET }}
gistID: d841536a179eda023f7f7632ac8bf097
filename: ${{ env.REPO }}__${{ env.BRANCH }}.json
label: OWL EL
message: ${{ env.EL_LABEL }}
color: ${{ env.EL_COLOR }}
- name: Create the OWL_QL Badge
uses: schneegans/dynamic-badges-action@v1.7.0
with:
auth: ${{ secrets.GIST_SECRET }}
gistID: f71c4cfd7771cad2396dce2bd05342f4
filename: ${{ env.REPO }}__${{ env.BRANCH }}.json
label: OWL QL
message: ${{ env.QL_LABEL }}
color: ${{ env.QL_COLOR }}
- name: Create the OWL_RL Badge
uses: schneegans/dynamic-badges-action@v1.7.0
with:
auth: ${{ secrets.GIST_SECRET }}
gistID: d0b6815d22e3ab9bec11be83f725c9f9
filename: ${{ env.REPO }}__${{ env.BRANCH }}.json
label: OWL RL
message: ${{ env.RL_LABEL }}
color: ${{ env.RL_COLOR }}