Skip to content

Commit

Permalink
Merge pull request #37 from yext/dev/update_coverage_reusable_workflow
Browse files Browse the repository at this point in the history
Updated coverage workflow to satisfy node20 requirements
  • Loading branch information
jesuyedavid authored Apr 17, 2024
2 parents c4dd373 + 03a2803 commit a4e6207
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ jobs:
outputs:
coverage-percent: ${{ steps.parse-coverage.outputs.coverage-percent }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
ref: ${{ inputs.comparison_branch }}
- name: Use Node.js 16.x
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 16.x
registry-url: 'https://registry.npmjs.org'
Expand All @@ -52,9 +52,9 @@ jobs:
outputs:
coverage-percent: ${{ steps.parse-coverage.outputs.coverage-percent }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Use Node.js 16.x
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 16.x
registry-url: 'https://registry.npmjs.org'
Expand All @@ -69,7 +69,7 @@ jobs:
id: parse-coverage
- run: echo current coverage is ${{ steps.parse-coverage.outputs.coverage-percent }}%
- name: Upload lcov build artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: coverage
path: coverage/
Expand All @@ -78,7 +78,7 @@ jobs:
runs-on: ubuntu-latest
needs: [base-coverage, current-coverage]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Check if percent is too low
run: |
percentIsTooLow=$(echo ${{ needs.base-coverage.outputs.coverage-percent }} ${{ needs.current-coverage.outputs.coverage-percent }} |
Expand All @@ -89,11 +89,12 @@ jobs:
exit 1
fi
- name: Download the current coverage
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: coverage
path: coverage/
- name: Coveralls
uses: coverallsapp/github-action@master
uses: coverallsapp/github-action@v2
with:
file: coverage/lcov.info
github-token: ${{ secrets.caller_github_token }}

0 comments on commit a4e6207

Please sign in to comment.