Skip to content

Run All Code Generators #81

Run All Code Generators

Run All Code Generators #81

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,
enum-table-generator,
fred-categories-table-code-generator,
fundamentals-table-code-generator,
future-table-code-generator,
get-libraries,
glossary-generator,
market-hour-code-generator,
security-portfolio-table-generator,
Supported-Assets-Table-Code-Generator,
us-energy-indicators-code-generator,
Writing-Algorithm-API-Ref-Code-Generator
]
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: Install dependencies
run: |-
python -m pip install --upgrade pip
pip install numpy==1.22.3
pip install pandas==1.4.2
- 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