Skip to content

Testing new way to specify azure tests #6

Testing new way to specify azure tests

Testing new way to specify azure tests #6

name: Update PRCI checksum
on:
pull_request:
jobs:
compute-prci-checksum:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
- name: Compute checksum
run: |
cd src/test
# Compute the checksum of all prci .py source code
cksum=$(find tests -name '*.py' -exec grep -H -m 1 CLASSES {} \; | grep prci | cut -d':' -f1 | sort | xargs -n 1 cat | shasum -a 256 | cut -d' ' -f1)
# Update checksum in prci_checksum.txt
sed -i -e '/^# Checksum:/{' -e 'n' -e "s/.*/$cksum/" -e '}' prci_checksum.txt
- name: Commit and push changes
run: |
git config --global user.email "[email protected]"
git config --global user.name "GitHub Action"
git add -A
git commit -m "Update prci checksum" || echo "No changes to commit"
git push