Skip to content

[QMI-096] Checking out main code in pull request before running reusa… #10

[QMI-096] Checking out main code in pull request before running reusa…

[QMI-096] Checking out main code in pull request before running reusa… #10

Workflow file for this run

name: QMI Python CI runner on pull request

Check failure on line 1 in .github/workflows/pull-request-ci.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/pull-request-ci.yml

Invalid workflow file

No steps defined in `steps` and no workflow called in `uses` for the following jobs: build
on:
pull_request:
branches: [ "main" ]
paths-ignore:
- README.md
- CHANGELOG.md
- .gitignore
- ACKNOWLEDGEMENTS.md
- LICENSE.md
- CONTRIBUTING.md
- TESTING.md
jobs:
build:
runs-on: ubuntu-latest
strategy:
max-parallel: 3
matrix:
python-version: ["3.8", "3.9", "3.10"]
uses: ./.github/workflows/reusable-ci-workflows.yml
with:
python-version: ${{ matrix.python-version }}
ref: ${{ github.head_ref }}
additional-steps:
runs-on: ubuntu-latest
needs: build
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{ inputs.ref }}
- name: Generate and push badges
if: ${{ matrix.python-version == '3.10' }}
run: |
pip install anybadge
anybadge -o -l pylint -v $(tail -n 2 pylint.log | grep -o '[0-9]\{1,2\}\.[0-9]\{2\}' | head -n 1) -f $BADGES_DIR/pylint.svg 2=red 4=orange 8=yellow 10=green
anybadge -o -l mypy -v $([ -n "$(tail -n 1 mypy.log | grep -e '^Succes')" ] && echo pass || echo fail) -f $BADGES_DIR/mypy.svg fail=red pass=green
COVERAGE_PERC=$(grep "TOTAL" coverage.log | grep -Eo '[0-9.]+%' | sed 's/%//')
anybadge -o -l coverage -v $COVERAGE_PERC -f $BADGES_DIR/coverage.svg 60=red 80=orange 100=green
git config user.name "Badge Bot"
git config user.email "<>"
git add $BADGES_DIR/*.svg
git commit -m "Update badges" || true
git push || true