Skip to content

Commit 556703f

Browse files
committed
ci: cancel duplicate workflow runs and add read permissions
- Add concurrency settings to cancel outdated runs when new commits are pushed - Add contents: read permission for security hardening - Remove redundant required job that checked test results
1 parent 6b9f8fb commit 556703f

File tree

1 file changed

+8
-15
lines changed

1 file changed

+8
-15
lines changed

.github/workflows/test.yml

Lines changed: 8 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,14 @@ on:
66
- dev
77
pull_request:
88
workflow_dispatch:
9+
10+
concurrency:
11+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
12+
cancel-in-progress: true
13+
14+
permissions:
15+
contents: read
16+
917
jobs:
1018
unit:
1119
name: unit (${{ matrix.settings.name }})
@@ -86,18 +94,3 @@ jobs:
8694
path: |
8795
packages/app/e2e/test-results
8896
packages/app/e2e/playwright-report
89-
90-
required:
91-
name: test (linux)
92-
runs-on: blacksmith-4vcpu-ubuntu-2404
93-
needs:
94-
- unit
95-
- e2e
96-
if: always()
97-
steps:
98-
- name: Verify upstream test jobs passed
99-
run: |
100-
echo "unit=${{ needs.unit.result }}"
101-
echo "e2e=${{ needs.e2e.result }}"
102-
test "${{ needs.unit.result }}" = "success"
103-
test "${{ needs.e2e.result }}" = "success"

0 commit comments

Comments
 (0)