Skip to content

Commit 3fa58e7

Browse files
author
Dan Zubko
committed
Created selfhosted-smoke-test.yml
1 parent b82f5f2 commit 3fa58e7

1 file changed

Lines changed: 65 additions & 0 deletions

File tree

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
name: Self-hosted Runner Smoke Test
2+
3+
on:
4+
workflow_dispatch: {} # allows manual trigger from the Actions tab
5+
push:
6+
paths:
7+
- .github/workflows/selfhosted-smoke-test.yml
8+
9+
permissions:
10+
contents: read
11+
12+
jobs:
13+
runner-check:
14+
# If you added custom labels to your runner (e.g., 'macOS', 'ORNL'),
15+
# replace 'self-hosted' with your specific labels:
16+
# runs-on: [self-hosted, macOS]
17+
runs-on: self-hosted
18+
19+
steps:
20+
- name: Checkout (no repo content needed but proves token works)
21+
uses: actions/checkout@v4
22+
23+
- name: Print runner basics
24+
run: |
25+
echo "Runner name: $RUNNER_NAME"
26+
echo "Runner OS: $RUNNER_OS"
27+
echo "Runner arch: $RUNNER_ARCH"
28+
echo "Workspace: $GITHUB_WORKSPACE"
29+
echo "Repository: $GITHUB_REPOSITORY"
30+
echo "Actor: $GITHUB_ACTOR"
31+
echo "Ref: $GITHUB_REF"
32+
echo "Commit SHA: $GITHUB_SHA"
33+
echo "Labels: $RUNNER_LABELS"
34+
35+
- name: List environment
36+
run: env | sort
37+
38+
- name: Verify outbound connectivity to GitHub
39+
run: |
40+
set -e
41+
echo "Pinging api.github.com..."
42+
curl -sS -I https://api.github.com | head -n 1
43+
echo "Pinging github.com..."
44+
curl -sS -I https://github.com | head -n 1
45+
echo "Connectivity OK."
46+
47+
- name: Verify connectivity to Checkmarx (HTTP(S) reachability)
48+
# This confirms your runner can reach the on-prem server.
49+
# If your Checkmarx uses a private CA, this may fail unless the CA is trusted locally.
50+
continue-on-error: true
51+
run: |
52+
set -e
53+
echo "Checking https://checkmarx.ornl.gov/cxrestapi/version..."
54+
curl -sS -k https://checkmarx.ornl.gov/cxrestapi/version || true
55+
echo "If this printed JSON version info, connectivity is good."
56+
57+
- name: Runner file system sanity check
58+
run: |
59+
echo "Creating a temp file in $RUNNER_TEMP ..."
60+
echo "Hello from self-hosted runner at $(date)" > "$RUNNER_TEMP/hello.txt"
61+
ls -al "$RUNNER_TEMP"
62+
cat "$RUNNER_TEMP/hello.txt"
63+
64+
- name: Done
65+
run: echo "✅ Self-hosted runner smoke test completed."

0 commit comments

Comments
 (0)