Skip to content

Commit aa755fe

Browse files
committed
use self-hosted runners for snapshot approval
1 parent db98a68 commit aa755fe

File tree

1 file changed

+8
-16
lines changed

1 file changed

+8
-16
lines changed

.github/workflows/approve-playwright-snapshots.yml

Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55
jobs:
66
comment-action-start:
77
name: Comment action started
8-
runs-on: ubuntu-latest
8+
runs-on: [self-hosted, Linux, X64]
99
if: github.event.issue.pull_request && contains(github.event.comment.body, '/approve-snapshots') && github.event.comment.author_association == 'MEMBER'
1010
outputs:
1111
pr_head: ${{ steps.comment-branch.outputs.head_ref }}
@@ -34,7 +34,7 @@ jobs:
3434
update-snapshots-aarch64:
3535
name: Update Snapshots aarch64
3636
if: github.event.issue.pull_request && contains(github.event.comment.body, '/approve-snapshots') && github.event.comment.author_association == 'MEMBER'
37-
runs-on: ubuntu-22.04-arm
37+
runs-on: [self-hosted, Linux, X64]
3838
permissions:
3939
contents: write
4040
pull-requests: write
@@ -56,21 +56,17 @@ jobs:
5656
with:
5757
attic_token: ${{ secrets.ATTIC_TOKEN }}
5858
github_token: ${{ secrets.GITHUB_TOKEN }}
59-
- name: Install Node.js
60-
uses: actions/setup-node@v4
61-
with:
62-
node-version: "22"
6359
- name: Install dependencies
6460
run: |
65-
npm ci
61+
nix develop .#ci --command npm ci
6662
working-directory: frontend
6763
- name: Build application
6864
run: |
6965
nix build .#thymis-controller
7066
- name: Run tests
7167
run: |
7268
export THYMIS_FLAKE_ROOT='..'
73-
nix develop .#forNpmTesting --command npm run test:integration -- --update-snapshots
69+
nix develop .#ci --command ../.github/npm_test_integration.sh -- --update-snapshots
7470
working-directory: frontend
7571
- name: Upload Playwright report
7672
uses: actions/upload-artifact@v4
@@ -94,7 +90,7 @@ jobs:
9490
update-snapshots-x86_64:
9591
name: Update Snapshots x86_64
9692
if: github.event.issue.pull_request && contains(github.event.comment.body, '/approve-snapshots') && github.event.comment.author_association == 'MEMBER'
97-
runs-on: ubuntu-latest
93+
runs-on: [self-hosted, Linux, X64]
9894
permissions:
9995
contents: write
10096
pull-requests: write
@@ -116,13 +112,9 @@ jobs:
116112
with:
117113
attic_token: ${{ secrets.ATTIC_TOKEN }}
118114
github_token: ${{ secrets.GITHUB_TOKEN }}
119-
- name: Install Node.js
120-
uses: actions/setup-node@v4
121-
with:
122-
node-version: "22"
123115
- name: Install dependencies
124116
run: |
125-
npm ci
117+
nix develop .#ci --command npm ci
126118
working-directory: frontend
127119
- name: Build application
128120
run: |
@@ -131,7 +123,7 @@ jobs:
131123
run: |
132124
if [ -f "tests/x86_vm.spec.ts" ]; then
133125
export THYMIS_FLAKE_ROOT='..'
134-
nix develop .#forNpmTesting --command npm run test:integration -- "tests/x86_vm.spec.ts" --update-snapshots
126+
nix develop .#ci --command ../.github/npm_test_integration.sh -- "tests/x86_vm.spec.ts" --update-snapshots
135127
fi
136128
working-directory: frontend
137129
- name: Upload Playwright report
@@ -150,7 +142,7 @@ jobs:
150142

151143
upload-artifacts:
152144
name: Upload Artifacts
153-
runs-on: ubuntu-latest
145+
runs-on: [self-hosted, Linux, X64]
154146
needs: [comment-action-start, update-snapshots-aarch64, update-snapshots-x86_64]
155147
steps:
156148
- name: Get Thymis App Token

0 commit comments

Comments
 (0)