forked from testcontainers/testcontainers-node
-
Notifications
You must be signed in to change notification settings - Fork 0
79 lines (71 loc) · 2.65 KB
/
windows-test.yml
File metadata and controls
79 lines (71 loc) · 2.65 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
name: Test Windows
on:
repository_dispatch:
types: [windows-test-command]
jobs:
docker:
runs-on: [self-hosted, Windows, X64]
strategy:
fail-fast: false
steps:
- name: Create pending status
uses: actions/github-script@v7.0.1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
async ({ github, context }) => {
await github.rest.repos.createCommitStatus({
owner: context.repo.owner,
repo: context.repo.repo,
sha: context.payload.client_payload.pull_request.head.sha,
state: 'pending',
target_url: `${context.serverUrl}/${context.repo.owner}/${context.repo.repo}/actions/runs/${context.runId}`,
context: 'Test Windows',
});
}
- name: Checkout
uses: actions/checkout@v5
with:
token: ${{ secrets.GITHUB_TOKEN }}
repository: ${{ github.event.client_payload.pull_request.head.repo.full_name }}
ref: ${{ github.event.client_payload.pull_request.head.ref }}
- name: Install NodeJS
uses: actions/setup-node@v4
with:
node-version: 24.x
- name: Install dependencies
run: npm ci
- name: Run tests
run: npm run test:ci
- name: Create success status
uses: actions/github-script@v7.0.1
if: success()
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
async ({ github, context }) => {
await github.rest.repos.createCommitStatus({
owner: context.repo.owner,
repo: context.repo.repo,
sha: context.payload.client_payload.pull_request.head.sha,
state: 'success',
target_url: `${context.serverUrl}/${context.repo.owner}/${context.repo.repo}/actions/runs/${context.runId}`,
context: 'Test Windows',
});
}
- name: Create failure status
uses: actions/github-script@v7.0.1
if: failure()
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
async ({ github, context }) => {
await github.rest.repos.createCommitStatus({
owner: context.repo.owner,
repo: context.repo.repo,
sha: context.payload.client_payload.pull_request.head.sha,
state: 'failure',
target_url: `${context.serverUrl}/${context.repo.owner}/${context.repo.repo}/actions/runs/${context.runId}`,
context: 'Test Windows',
});
}