Skip to content

Run All Code Generators #270

Run All Code Generators

Run All Code Generators #270

name: Run All Code Generators
on:
schedule:
- cron: "0 10 * * 5" # Runs "at 10 UTC every Friday" (see https://crontab.guru)
workflow_dispatch: # Run on manual trigger
jobs:
run_matrix:
strategy:
fail-fast: false
matrix:
script: [Alternative-Datasets-Code-Generator,
API-Reference-Code-Generator,
fred-categories-table-code-generator,
fundamentals-table-code-generator,
future-table-code-generator,
glossary-generator,
Lean-CLI-API-Reference-Code-Generator,
market-hour-code-generator,
Supported-Assets-Table-Code-Generator,
us-energy-indicators-code-generator,
writing-algorithm-api-reference-sphinx-code-generator
]
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install dependencies
run: |-
python -m pip install --upgrade pip
pip install beautifulsoup4==4.12.3
pip install pandas==1.4.2
- name: Free space
run: df -h && rm -rf /usr/share/dotnet && sudo rm -rf /usr/local/lib/android && sudo rm -rf /opt/ghc && rm -rf /opt/hostedtoolcache* && df -h
- name: Run ${{ matrix.script }} Python Script
run: python code-generators/${{ matrix.script }}.py
- name: Push to Branch
run: |-
if [[ $(git diff | wc -m) == 0 ]]; then
exit 0
fi
BRANCH=github-action-${{matrix.script}}
git config user.name GitHub Actions
git config user.email [email protected]
git checkout -b $BRANCH
git add .
git commit -m "Code generated by ${{ matrix.script }}.py"
git push --set-upstream origin $BRANCH -f