Skip to content

windows-test-command #12

windows-test-command

windows-test-command #12

Workflow file for this run

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@0.9.0
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
github.repos.createStatus({
owner: context.repo.owner,
repo: context.repo.repo,
sha: context.payload.client_payload.pull_request.head.sha,
state: 'pending',
target_url: `https://github.com/${process.env.GITHUB_REPOSITORY}/actions/runs/${process.env.GITHUB_RUN_ID}`,
context: 'Test Windows',
})
- name: Checkout
uses: actions/checkout@v3
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 18.x
uses: actions/setup-node@v3
with:
node-version: 18.x
- name: Install dependencies
run: npm ci --omit=optional
- name: Run tests
run: npm run test:ci
- name: Create success status
uses: actions/github-script@0.9.0
if: success()
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
github.repos.createStatus({
owner: context.repo.owner,
repo: context.repo.repo,
sha: context.payload.client_payload.pull_request.head.sha,
state: 'success',
target_url: `https://github.com/${process.env.GITHUB_REPOSITORY}/actions/runs/${process.env.GITHUB_RUN_ID}`,
context: 'Test Windows',
})
- name: Create failure status
uses: actions/github-script@0.9.0
if: failure()
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
github.repos.createStatus({
owner: context.repo.owner,
repo: context.repo.repo,
sha: context.payload.client_payload.pull_request.head.sha,
state: 'failure',
target_url: `https://github.com/${process.env.GITHUB_REPOSITORY}/actions/runs/${process.env.GITHUB_RUN_ID}`,
context: 'Test Windows',
})