-
-
Notifications
You must be signed in to change notification settings - Fork 5
87 lines (75 loc) · 3.03 KB
/
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
name: Test setup-cloudflared
on:
push:
paths:
- action.yml
- scripts/**
- shutdown/action.yml
- .github/workflows/test.yaml
pull_request:
paths:
- action.yml
- scripts/**
- shutdown/action.yml
- .github/workflows/test.yaml
jobs:
test-ubuntu:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
version: [latest, 2023.8.1]
steps:
- name: Setup cloudflared using setup-cloudflared
uses: AnimMouse/setup-cloudflared@main
with:
cloudflare_tunnel_credential: ${{ secrets.CLOUDFLARE_TUNNEL_CREDENTIAL }}
cloudflare_tunnel_configuration: ${{ secrets.CLOUDFLARE_TUNNEL_CONFIGURATION_UBUNTU }}
cloudflare_tunnel_id: ${{ secrets.CLOUDFLARE_TUNNEL_ID }}
- name: Test cloudflared installed by setup-cloudflared using Python HTTP server for 1 minute
run: timeout 1m python -m http.server 8080 || true
- name: Shutdown cloudflared using setup-cloudflared/shutdown
if: always()
uses: AnimMouse/setup-cloudflared/shutdown@main
test-macos:
runs-on: macos-latest
strategy:
fail-fast: false
matrix:
version: [latest, 2023.8.1]
steps:
- name: Setup cloudflared using setup-cloudflared
uses: AnimMouse/setup-cloudflared@main
with:
cloudflare_tunnel_credential: ${{ secrets.CLOUDFLARE_TUNNEL_CREDENTIAL }}
cloudflare_tunnel_configuration: ${{ secrets.CLOUDFLARE_TUNNEL_CONFIGURATION_MACOS }}
cloudflare_tunnel_id: ${{ secrets.CLOUDFLARE_TUNNEL_ID }}
- name: Test cloudflared installed by setup-cloudflared using Python HTTP server for 1 minute
run: |
function timeout(){ perl -e 'alarm shift; exec @ARGV' "$@"; }
timeout 60 python3 -m http.server 8080 || true
- name: Shutdown cloudflared using setup-cloudflared/shutdown
if: always()
uses: AnimMouse/setup-cloudflared/shutdown@main
test-windows:
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
version: [latest, 2023.8.1]
steps:
- name: Setup cloudflared using setup-cloudflared
uses: AnimMouse/setup-cloudflared@main
with:
cloudflare_tunnel_credential: ${{ secrets.CLOUDFLARE_TUNNEL_CREDENTIAL }}
cloudflare_tunnel_configuration: ${{ secrets.CLOUDFLARE_TUNNEL_CONFIGURATION_WINDOWS }}
cloudflare_tunnel_id: ${{ secrets.CLOUDFLARE_TUNNEL_ID }}
- name: Test cloudflared installed by setup-cloudflared using Python HTTP server for 1 minute
run: |
$http_server = Start-Process "python" "-m http.server 8080" -PassThru
Wait-Process $http_server.Id -Timeout 60 -ErrorAction Ignore
$http_server.CloseMainWindow()
Wait-Process $http_server.Id
- name: Shutdown cloudflared using setup-cloudflared/shutdown
if: always()
uses: AnimMouse/setup-cloudflared/shutdown@main