mirror of
https://github.com/step-security/harden-runner.git
synced 2026-06-06 03:17:07 +00:00
Bumps [step-security/publish-unit-test-result-action](https://github.com/step-security/publish-unit-test-result-action) from 1 to 2. - [Release notes](https://github.com/step-security/publish-unit-test-result-action/releases) - [Commits](https://github.com/step-security/publish-unit-test-result-action/compare/v1...v2) --- updated-dependencies: - dependency-name: step-security/publish-unit-test-result-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
46 lines
1.3 KiB
YAML
46 lines
1.3 KiB
YAML
name: Test
|
|
on:
|
|
pull_request:
|
|
branches:
|
|
- main
|
|
push:
|
|
branches:
|
|
- main # to update code coverage
|
|
|
|
permissions: # added using https://github.com/step-security/secure-workflows
|
|
contents: read
|
|
concurrency:
|
|
group: ${{ github.workflow }}
|
|
jobs:
|
|
test:
|
|
permissions:
|
|
checks: write
|
|
pull-requests: write
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Harden Runner
|
|
uses: step-security/harden-runner@0d381219ddf674d61a7572ddd19d7941e271515c # v2.9.0
|
|
with:
|
|
disable-sudo: true
|
|
egress-policy: audit
|
|
allowed-endpoints: >
|
|
api.github.com:443
|
|
codecov.io:443
|
|
github.com:443
|
|
registry.npmjs.org:443
|
|
storage.googleapis.com:443
|
|
uploader.codecov.io:443
|
|
|
|
- name: Checkout
|
|
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
|
- name: Install Dependencies
|
|
run: npm ci
|
|
- name: Run coverage
|
|
run: npm test -- --coverage
|
|
- uses: codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d # v3.1.4
|
|
- name: Publish Test Results
|
|
uses: step-security/publish-unit-test-result-action@v2
|
|
if: always()
|
|
with:
|
|
files: |
|
|
reports/*.xml
|