Skip to content

Commit a06e670

Browse files
committed
Add tests
1 parent 59290cf commit a06e670

File tree

3 files changed

+108
-0
lines changed

3 files changed

+108
-0
lines changed

.github/workflows/test-all.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Test Dev Proxy Actions
2+
3+
on:
4+
workflow_dispatch:
5+
6+
jobs:
7+
test-install-start:
8+
name: Test Dev Proxy Actions
9+
runs-on: ubuntu-latest
10+
env:
11+
LOG_FILE: devproxy.log
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v4
15+
16+
- name: Intall Dev Proxy
17+
id: install-latest
18+
uses: ./install
19+
20+
- name: Start Dev Proxy
21+
id: start-devproxy
22+
uses: ./start
23+
with:
24+
logFile: ${{ env.LOG_FILE }}
25+
26+
- name: Start recording
27+
id: start-recording
28+
uses: ./record-start
29+
30+
- name: Send request
31+
id: send-request
32+
run: |
33+
curl -ikx http://127.0.0.1:8000 https://jsonplaceholder.typicode.com/posts
34+
35+
- name: Stop recording
36+
id: stop-recording
37+
uses: ./record-stop
38+
39+
- name: Stop Dev Proxy
40+
id: stop-devproxy
41+
uses: ./stop
42+
43+
- name: Show logs
44+
run: |
45+
echo "Dev Proxy logs:"
46+
cat ${{ env.LOG_FILE }}
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Test Install Latest Version
2+
3+
on:
4+
workflow_dispatch:
5+
6+
jobs:
7+
test-install-latest:
8+
name: Test Install Latest Version
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Checkout
12+
uses: actions/checkout@v4
13+
14+
- name: Test Install Latest
15+
id: install-latest
16+
uses: ./install
17+
18+
- name: Verify Installation
19+
run: |
20+
# Check if devproxy binary exists
21+
if [ -f "./devproxy/devproxy" ]; then
22+
echo "✅ Dev Proxy binary found"
23+
./devproxy/devproxy --version || echo "Version check failed but binary exists"
24+
elif command -v devproxy &> /dev/null; then
25+
echo "✅ Dev Proxy found in PATH"
26+
devproxy --version
27+
else
28+
echo "❌ Dev Proxy not found"
29+
exit 1
30+
fi
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Test Install Specific Version
2+
3+
on:
4+
workflow_dispatch:
5+
6+
jobs:
7+
test-install-specific-version:
8+
name: Test Install Specific Version
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Checkout
12+
uses: actions/checkout@v4
13+
14+
- name: Test Install Specific Version
15+
id: install-version
16+
uses: ./install
17+
with:
18+
version: v0.29.2
19+
20+
- name: Verify Installation
21+
run: |
22+
# Check if devproxy binary exists
23+
if [ -f "./devproxy/devproxy" ]; then
24+
echo "✅ Dev Proxy binary found"
25+
./devproxy/devproxy --version || echo "Version check failed but binary exists"
26+
elif command -v devproxy &> /dev/null; then
27+
echo "✅ Dev Proxy found in PATH"
28+
devproxy --version
29+
else
30+
echo "❌ Dev Proxy not found"
31+
exit 1
32+
fi

0 commit comments

Comments
 (0)