Skip to content

Commit

Permalink
ci: limit permissions of e2e-tests workflow and pin actions to commit…
Browse files Browse the repository at this point in the history
… SHA
  • Loading branch information
johanohly committed Nov 22, 2024
1 parent 5cdb027 commit 180eafe
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions .github/workflows/e2e-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,29 @@ on:
branches: ['main']
workflow_dispatch:

permissions:
contents: read

jobs:
e2e_tests:
name: 'E2E Tests'
timeout-minutes: 60
runs-on: ubuntu-latest

steps:
- name: Harden Runner
uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1
with:
egress-policy: audit

- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- uses: oven-sh/setup-bun@4bc047ad259df6fc24a6c9b0f9a0cb08cf17fbe5 # v2

- name: Set up env
run: cp .env.example .env && sed -i 's/password@db/password@localhost/' .env

- name: Cache dependencies
uses: actions/cache@v3
uses: actions/cache@e12d46a63a90f2fae62d114769bbf2a179198b5c # v3.3.3
id: cache-dependencies
with:
path: node_modules
Expand All @@ -39,7 +47,7 @@ jobs:

- name: Cache playwright
id: cache-playwright
uses: actions/cache@v3
uses: actions/cache@e12d46a63a90f2fae62d114769bbf2a179198b5c # v3.3.3
with:
path: |
~/.cache/ms-playwright
Expand All @@ -60,7 +68,7 @@ jobs:
- name: Run Playwright tests
run: bun run test:e2e

- uses: actions/upload-artifact@v4
- uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
if: always()
with:
name: test-results
Expand Down

0 comments on commit 180eafe

Please sign in to comment.