-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (41 loc) · 1.45 KB
/
translation-check.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
# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: Translation Check
on: [push, pull_request]
jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.9'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r validator/requirements.txt
- name: Translation Validator
id: translationvalidat
continue-on-error: true # Continue to Output Step anyway
run: |
set +e
cd validator
python main.py "../The_Colonists_Translation_Data_Italian.csv"
if [ $? -ne 0 ]; then
echo "Translation Check Command failed, setting status to failure"
echo "status=failure" >> $GITHUB_ENV
else
echo "Translation Check Command succeeded, setting status to success"
echo "status=success" >> $GITHUB_ENV
fi
- name: Output result
run: |
cd validator
cat result.txt
echo "Translation Check Status is ${{ env.status }}"
if [ "${{ env.status }}" = "failure" ]; then
echo "Found failure status, exiting with 1..."
echo "::error::Previous step failed"
exit 1
fi