Tests #6
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: 02 Review Staging | |
| on: | |
| workflow_dispatch: | |
| pull_request: | |
| concurrency: | |
| group: staging-${{github.event.pull_request.number}} | |
| cancel-in-progress: true | |
| jobs: | |
| test-or-stub: | |
| name: "check missing staged file" | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Set execute permissions | |
| run: | | |
| chmod +x ${{ github.workspace }}/tools/src_*.sh || true | |
| chmod +x ${{ github.workspace }}/staging/test_*.sh || true | |
| chmod +x ${{ github.workspace }}/staging/meta_*.sh || true | |
| - name: Run tests or stub | |
| run: | | |
| shopt -s nullglob | |
| test_scripts=( ${{ github.workspace }}/staging/test_*.sh ) | |
| if [ ${#test_scripts[@]} -eq 0 ]; then | |
| echo "No test_*.sh scripts found in ${{ github.workspace }}/staging." | |
| echo "Try run :" | |
| echo "./tools/staging_stub_missing_meta_tests.sh..." | |
| echo "::error::No test scripts found. A test template stub was created." | |
| echo "To create a new test template:" | |
| echo " 1. Edit the stub file generated by staging_stub_missing_meta_tests.sh in ${{ github.workspace }}/staging/" | |
| echo " 2. Rename and adapt it to match your module." | |
| echo " 3. Make sure it is executable: chmod +x ${{ github.workspace }}/staging/test_<your_module>.sh" | |
| exit 1 | |
| fi | |
| done |