Skip to content

windows-test-command #48

windows-test-command

windows-test-command #48

Workflow file for this run

name: Windows tests
on:
repository_dispatch:
types: [windows-test-command]
jobs:
test-windows:
runs-on: [self-hosted, Windows, X64, desktop-windows-intel]
timeout-minutes: 30
steps:
- name: Create pending status
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
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: `https://github.com/${process.env.GITHUB_REPOSITORY}/actions/runs/${process.env.GITHUB_RUN_ID}`,
context: 'Windows tests',
})
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
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: Set up Go
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5
with:
go-version-file: go.mod
id: go
- name: modVerify
run: go mod verify
- name: modTidy
run: go mod tidy
- name: ensure compilation
run: go build
- name: go test
timeout-minutes: 30
run: make test-unit
- name: Create success status
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
if: success()
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
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: `https://github.com/${process.env.GITHUB_REPOSITORY}/actions/runs/${process.env.GITHUB_RUN_ID}`,
context: 'Windows tests',
})
- name: Create failure status
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
if: failure()
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
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: `https://github.com/${process.env.GITHUB_REPOSITORY}/actions/runs/${process.env.GITHUB_RUN_ID}`,
context: 'Windows tests',
})