Update dependency core-js to v3.47.0 #5
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: Test and Publish | |
| on: | |
| push: | |
| branches: [ "master" ] | |
| tags: [ "v*" ] | |
| pull_request: | |
| branches: [ "master" ] | |
| jobs: | |
| test-publish: | |
| name: Test, Coverage & Publish | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| id-token: write | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| cache: 'npm' | |
| registry-url: 'https://registry.npmjs.org' | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Run tests | |
| run: npm run test | |
| - name: Extract Coverage Metric | |
| id: coverage-calc | |
| run: | | |
| METRIC_VALUE=$(awk -F '[:,}]' '{print $20}' ./coverage/coverage-summary.json | head -1) | |
| echo "Found coverage value: $METRIC_VALUE" | |
| echo "coverage_value=$METRIC_VALUE" >> $GITHUB_OUTPUT | |
| - name: Publish code coverage to compass | |
| uses: verygood-ops/cicd-shared/.github/actions/compass@compass-action-v1.0.0 | |
| with: | |
| api_key: ${{ secrets.COMPASS_API_KEY }} | |
| metric_source_id: 'ari:cloud:compass:83673fa7-fd28-4f4a-9738-f584064570a7:metric-source/db43f86d-85fe-42e1-954d-457f5a4082b8/f6f374b0-00a5-474e-a0d3-560402b3dd89' | |
| metric_value: ${{ steps.coverage-calc.outputs.coverage_value }} | |
| - name: Publish package | |
| if: startsWith(github.ref, 'refs/tags/v') | |
| run: npm publish --provenance --access public |