Update python-app.yml #23
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
- name: Debug Language Variable | ||
run: echo "LANGUAGE is set to ${{ env.LANGUAGE }}" | ||
# Test each mod | ||
- name: Checking Translation | ||
run: | | ||
python mod_translate_track.py ${{ matrix.mod }} ${{ vars.LANGUAGE }} | ||
# Collect artifacts from the output/ directory | ||
- name: Upload Artifacts | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: output-${{ matrix.mod }##*/} | ||
Check failure on line 67 in .github/workflows/python-app.yml GitHub Actions / Test ModsInvalid workflow file
|
||
path: output/${{ matrix.mod }##*/}/* |