Skip to content

Commit

Permalink
ci: pin dependencies and specify permissions in the pipeline (#25)
Browse files Browse the repository at this point in the history
PR-URL: #25
  • Loading branch information
inigomarquinez authored Apr 30, 2024
1 parent 0b1fe5a commit d8aaf89
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,15 @@ on:
- pull_request
- push

permissions:
contents: read

jobs:
test:
runs-on: ubuntu-20.04
permissions:
contents: read # for actions/checkout to fetch code
checks: write # for coverallsapp/github-action to create new checks
strategy:
matrix:
name:
Expand Down Expand Up @@ -124,7 +130,7 @@ jobs:
node-version: "21.7"

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 #v4.1.1

- name: Install Node.js ${{ matrix.node-version }}
shell: bash -eo pipefail -l {0}
Expand Down Expand Up @@ -195,7 +201,7 @@ jobs:
run: npm run lint

- name: Collect code coverage
uses: coverallsapp/github-action@master
uses: coverallsapp/github-action@3dfc5567390f6fa9267c0ee9c251e4c8c3f18949 #v2.2.3
if: steps.list_env.outputs.nyc != ''
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -205,9 +211,12 @@ jobs:
coverage:
needs: test
runs-on: ubuntu-latest
permissions:
contents: read # for actions/checkout to fetch code
checks: write # for coverallsapp/github-action to create new checks
steps:
- name: Upload code coverage
uses: coverallsapp/github-action@master
uses: coverallsapp/github-action@3dfc5567390f6fa9267c0ee9c251e4c8c3f18949 #v2.2.3
with:
github-token: ${{ secrets.github_token }}
parallel-finished: true
Expand Down

0 comments on commit d8aaf89

Please sign in to comment.