Testing new way to specify azure tests #3
Workflow file for this run
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: 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 | |
pwd | |
ls | |
# 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 |