Skip to content

Merge pull request #35 from AndreHauschild/devel #5

Merge pull request #35 from AndreHauschild/devel

Merge pull request #35 from AndreHauschild/devel #5

Workflow file for this run

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: Install dependencies from cssrlib-data repository
run: pip install -r requirements.txt
- name: Get branch name
id: get_branch_name
run: echo "branch_name=$(basename $GITHUB_REF)" >> $GITHUB_OUTPUT
- name: Clone cssrlib repository
run: git clone -b ${{ steps.get_branch_name.outputs.branch_name }} https://github.com/${{ github.actor }}/cssrlib.git
- name: Install dependencies from cssrlib repository
run: |
cd cssrlib
pip install -r requirements.txt
- name: Execute Python scripts
run: |
export PYTHONPATH="../cssrlib/src:$PYTHONPATH"
cd ./samples
for file in $(find . -name "*.py"); do
echo "# Execute $file"
echo "#"
python "$file" > /dev/null
echo "# ...done!"
echo "#"
echo
done