build(deps-dev): bump vite from 6.3.5 to 6.3.6 in /code/frontend #140
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: Update Coverage Badge | |
on: | |
push: | |
branches: ['**'] | |
pull_request: | |
branches: ['**'] | |
types: [opened, synchronize, reopened] | |
jobs: | |
update-badge: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
pull-requests: write | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Setup JDK | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '17' | |
distribution: 'zulu' | |
- name: Setup Gradle | |
uses: gradle/gradle-build-action@v2 | |
- name: Run backend coverage | |
working-directory: ./code/backend/getactivecore | |
run: | | |
./gradlew jacocoTestReport | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.x' | |
- name: Generate coverage JSON badge | |
run: | | |
pip install lxml | |
python ../../../.github/scripts/extract_coverage_and_generate_badge.py | |
mv ../badges/coverage.json /tmp/coverage.json # Move to avoid untracked files git issue in the next step | |
working-directory: ./code/backend/getactivecore | |
- name: Checkout coverage-badge branch | |
run: | | |
git fetch origin coverage-badge:coverage-badge | |
git switch coverage-badge | |
- name: Copy badge to branch | |
run: | | |
mkdir -p code/backend/badges | |
cp -f /tmp/coverage.json code/backend/badges/coverage.json | |
- name: Commit and push badge | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
git config user.name "arshdeepdhillon" | |
git config user.email "arshdhillon2050@gmail.com" | |
git add code/backend/badges/coverage.json | |
git commit -m "Update coverage JSON badge" || echo "No changes" | |
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git | |
git push origin coverage-badge |