mirror of
https://github.com/step-security/harden-runner.git
synced 2026-06-06 00:17:06 +00:00
36 lines
No EOL
1,009 B
YAML
36 lines
No EOL
1,009 B
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:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Harden Runner
|
|
uses: step-security/harden-runner@03bee3930647ebbf994244c21ddbc0d4933aab4f # v2.3.0
|
|
with:
|
|
disable-sudo: true
|
|
egress-policy: block
|
|
allowed-endpoints: >
|
|
codecov.io:443
|
|
github.com:443
|
|
registry.npmjs.org:443
|
|
storage.googleapis.com:443
|
|
uploader.codecov.io:443
|
|
|
|
- name: Checkout
|
|
uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 # v3.5.0
|
|
- name: Install Dependencies
|
|
run: npm ci
|
|
- name: Run coverage
|
|
run: npm test -- --coverage
|
|
- uses: codecov/codecov-action@40a12dcee2df644d47232dde008099a3e9e4f865 # v3.1.2 |