Update GQM #7
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 GQM | |
on: | |
push: | |
branches: [main] | |
paths: | |
- "measuring/goals/**" | |
- "measuring/questions/**" | |
- "measuring/metrics/**" | |
workflow_dispatch: | |
jobs: | |
generateDiagram: | |
name: Generate Diagram | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
ssh-key: ${{ secrets.WEBSITE_DEPLOY_KEY }} | |
- name: Use Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: "21.x" | |
- run: npm install --prefix ./scripts/gqm_gen | |
- run: npm run coverage-report --prefix ./scripts/gqm_gen | |
- name: Report NYC coverage | |
uses: sidx1024/report-nyc-coverage-github-action@v1.2.7 | |
with: | |
coverage_file: ".nyc_output/nyc-coverage-report/coverage-summary.json" | |
- run: npm run --silent start --prefix ./scripts/gqm_gen > ./new_gqm.md.tmp | |
- run: sh ./scripts/gqm_gen/gqm_update.sh ./new_gqm.md.tmp ./measuring/use_gqm.md > ./measuring/use_gqm.md.tmp | |
- run: rm -f ./new_gqm.md.tmp | |
- run: mv -f ./measuring/use_gqm.md.tmp ./measuring/use_gqm.md | |
- name: Commit GQM Diagram | |
working-directory: ./measuring | |
run: | | |
git config --local user.name "github-actions[bot]" | |
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
git add . | |
git diff --staged --quiet || (git commit -m "Update Goals Questions Metrics Graph" && git push) |