Merge pull request #40 from AndreHauschild/devel #45
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: Execute Python Scripts | |
on: | |
push: | |
branches: | |
- main | |
- devel | |
jobs: | |
execute-scripts: | |
name: Execute Python Scripts | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout cssrlib-data repository | |
uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.10' | |
- name: Get branch name | |
id: get_branch_name | |
run: echo "branch_name=$(basename $GITHUB_REF)" >> $GITHUB_OUTPUT | |
- name: Install cssrlib base repository | |
run: pip install -U git+https://github.com/${{ github.actor }}/cssrlib.git@${{ steps.get_branch_name.outputs.branch_name }} | |
- name: Install dependencies for cssrlib-data repository | |
run: pip install -r requirements.txt | |
- name: Download IGS files | |
run: | | |
cd ./samples | |
python ./igs_download.py | |
- name: Execute Python scripts | |
run: | | |
cd ./samples | |
for file in $(find . -name "*.py"); do | |
if [ "$file" == "./igs_download.py" ]; then continue; fi | |
echo "# Execute $file" | |
echo "#" | |
python "$file" > /dev/null | |
echo "# ...done!" | |
echo "#" | |
echo | |
done |