Global simulation analysis after simulation addition #93
Workflow file for this run
This file contains hidden or 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: Validate Readme Files | |
| on: | |
| pull_request: | |
| paths: 'Simulations/**/README.yaml' | |
| permissions: | |
| contents: read | |
| pull-requests: write | |
| jobs: | |
| Check-Readme: | |
| if: github.repository == 'NMRLipids/BilayerData' | |
| runs-on: ubuntu-latest | |
| env: | |
| FMDL_DATA_PATH: ${{ github.workspace }}/BilayerData | |
| steps: | |
| - name: Checkout BilayerData | |
| uses: actions/checkout@v7 | |
| with: | |
| repository: ${{ github.event.pull_request.head.repo.full_name }} | |
| ref: ${{ github.event.pull_request.head.ref }} | |
| path: BilayerData | |
| persist-credentials: false | |
| - name: Install the gh cli | |
| uses: ksivamuthu/actions-setup-gh-cli@v3 | |
| with: | |
| version: 2.83.0 | |
| - name: Install FAIRMD_lipids dependencies | |
| run: | | |
| pip install git+https://github.com/NMRLipids/FAIRMD_lipids.git | |
| - name: Validate all README.yaml files | |
| working-directory: BilayerData | |
| shell: bash --noprofile --norc {0} | |
| run: | | |
| set +e | |
| mapfile -d '' -t files < <(find Simulations -name README.yaml -print0) | |
| out="$( | |
| python -m fairmd.lipids.schema_validation.validate_yaml \ | |
| --schema readme \ | |
| "${files[@]}" 2>&1 | |
| )" | |
| status=$? | |
| errors="" | |
| while IFS= read -r line; do | |
| case "$line" in | |
| ERROR:*) | |
| echo "::error::$line" | |
| errors+="$line"$'\n' | |
| ;; | |
| esac | |
| done <<< "$out" | |
| echo "::group::Full output" | |
| echo $out | |
| echo "::endgroup::" | |
| [ -n "$errors" ] || errors="None" | |
| { | |
| echo "## README.yaml validation" | |
| echo | |
| echo "**Errors:**" | |
| echo | |
| echo '```text' | |
| printf '%s' "$errors" | |
| echo | |
| echo '```' | |
| } >> "$GITHUB_STEP_SUMMARY" | |
| exit $status |