-
Notifications
You must be signed in to change notification settings - Fork 0
65 lines (56 loc) · 1.67 KB
/
python-app.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
name: Test Mods
on:
push:
branches:
- main
pull_request:
schedule:
- cron: '0 20 * * 5' # Triggers every Friday at 20:00 UTC
jobs:
read-mod-list:
runs-on: ubuntu-latest
outputs:
mods: ${{ steps.get-mods.outputs.mods }}
steps:
# Checkout the repo to access mod_list.txt
- name: Checkout Code
uses: actions/checkout@v3
# Read the mod_list.txt and convert to JSON
- name: Parse Mod List
id: get-mods
run: |
mods=$(cat mod_list.txt | jq -R -s -c 'split("\n") | map(select(. != ""))')
echo "Parsed mods: $mods"
echo "{mods}={$mods}" >> $GITHUB_OUTPUT
# echo "::set-output name=mods::$mods"
test-mods:
needs: read-mod-list
runs-on: ubuntu-latest
strategy:
matrix:
mod: ${{ fromJson(needs.read-mod-list.outputs.mods) }}
steps:
# Checkout the repo
- name: Checkout Code
uses: actions/checkout@v3
# Set up Python environment
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.8'
# Install dependencies
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
# Test each mod
- name: Test Mod
run: |
ls
python mod_translate_track.py ${{ matrix.mod }} ${{ github.repository }}.${{ env.LANGUAGE }}
# Collect artifacts from the output/ directory
- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
name: output-${{ matrix.mod }}
path: output/${{ matrix.mod }}/*