Skip to content

Commit 2709dff

Browse files
committed
Add test workflows for GitHub Actions runners
1 parent 3acd5ac commit 2709dff

File tree

2 files changed

+73
-0
lines changed

2 files changed

+73
-0
lines changed
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Test GitHub-Hosted Runner
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
workflow_dispatch: # Allow manual trigger
7+
8+
jobs:
9+
test-runner:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Checkout repository
14+
uses: actions/checkout@v4
15+
16+
- name: Display runner information
17+
run: |
18+
echo "Runner Name: $RUNNER_NAME"
19+
echo "Runner OS: $RUNNER_OS"
20+
echo "Runner Arch: $RUNNER_ARCH"
21+
echo "Hostname: $(hostname)"
22+
23+
- name: Test basic commands
24+
run: |
25+
echo "Testing basic commands..."
26+
node --version
27+
python3 --version
28+
git --version
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Test Self-Hosted Runner
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
workflow_dispatch: # Allow manual trigger
7+
8+
jobs:
9+
test-runner:
10+
runs-on: [self-hosted, Linux]
11+
12+
steps:
13+
- name: Checkout repository
14+
uses: actions/checkout@v4
15+
16+
- name: Display runner information
17+
run: |
18+
echo "Runner Name: $RUNNER_NAME"
19+
echo "Runner OS: $RUNNER_OS"
20+
echo "Runner Arch: $RUNNER_ARCH"
21+
echo "Hostname: $(hostname)"
22+
echo "User: $(whoami)"
23+
echo "Working Directory: $(pwd)"
24+
25+
- name: Check system resources
26+
run: |
27+
echo "=== CPU ==="
28+
nproc
29+
echo "=== Memory ==="
30+
free -h
31+
echo "=== Disk ==="
32+
df -h
33+
34+
- name: List environment
35+
run: |
36+
echo "=== Environment Variables ==="
37+
env | grep -E "(RUNNER|GITHUB|WORKSPACE)" | sort
38+
39+
- name: Test basic commands
40+
run: |
41+
echo "Testing basic commands..."
42+
node --version || echo "Node not found"
43+
python3 --version || echo "Python not found"
44+
git --version
45+
docker --version || echo "Docker not found (optional)"

0 commit comments

Comments
 (0)