[EngSys] Default all workflow perms to "content: read" (#32388) #4
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: GitHub Actions - Test | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- .github/** | |
pull_request: | |
paths: | |
- .github/** | |
workflow_dispatch: | |
permissions: | |
contents: read | |
defaults: | |
run: | |
shell: bash | |
working-directory: ./.github | |
jobs: | |
test: | |
runs-on: ubuntu-24.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
sparse-checkout: | | |
.github | |
- name: Setup Node 20 and install deps | |
uses: ./.github/actions/setup-node-install-deps | |
with: | |
# actions/github-script@v7 uses Node 20 | |
node-version: 20.x | |
working-directory: ./.github | |
- name: Run tests | |
run: npm run test:ci | |
- name: Archive code coverage results | |
uses: actions/upload-artifact@v4 | |
with: | |
name: code-coverage-report | |
path: ./.github/coverage | |
if-no-files-found: ignore |