-
Notifications
You must be signed in to change notification settings - Fork 52
47 lines (34 loc) · 1.07 KB
/
pr-test.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
name: Scuda CI
on:
pull_request:
branches: [main]
jobs:
tailscale_job:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Tailscale
uses: tailscale/github-action@v2
with:
oauth-client-id: k4oU8AFYf121CNTRL
oauth-secret: ${{ secrets.TS_OAUTH_SECRET }}
tags: tag:ci,tag:production
- name: Verify Tailscale IP
run: tailscale ip
- name: Run tests
run: |
ssh -o StrictHostKeyChecking=no -i ~/.ssh/id_rsa [email protected] 'bash -s' <<'EOF'
#!/bin/bash
cd /home/brodey/scuda-latest
ls
SCUDA_PORT=14834 ./local.sh server &
server_pid=$!
sleep 5
# change the port to our 'test' port
export SCUDA_SERVER=0.0.0.0:14834
./local.sh test && (echo "Tests passed successfully!"; exit 0) || (echo "Tests failed. Exiting..."; exit 1)
kill $server_pid
echo "server process terminated."
exit 0
EOF