File tree Expand file tree Collapse file tree 2 files changed +46
-1
lines changed Expand file tree Collapse file tree 2 files changed +46
-1
lines changed Original file line number Diff line number Diff line change 4343 phpunit_config : ' phpunit10.xml.dist' # PHPUnit 10.5
4444 fail-fast : false
4545 env :
46- REPO_URL : http ://localhost:8002 /
46+ REPO_URL : https ://localhost/
4747
4848 steps :
4949 - name : Checkout
@@ -70,10 +70,35 @@ jobs:
7070 with :
7171 dependency-versions : " highest"
7272
73+ - name : Create a temporary folder
74+ run : |
75+ mkdir build
76+
77+ - name : Install mkcert
78+ run : |
79+ sudo apt-get update
80+ sudo apt-get install libnss3-tools
81+ cd build
82+ curl -JLO "https://dl.filippo.io/mkcert/latest?for=linux/amd64"
83+ chmod +x mkcert-v*-linux-amd64
84+ sudo cp mkcert-v*-linux-amd64 /usr/local/bin/mkcert
85+
86+ - name : Generate an SSL certificate
87+ run : |
88+ cd build
89+ mkcert -install
90+ mkcert -key-file key.pem -cert-file cert.pem localhost 127.0.0.1 ::1
91+
7392 - name : Setup test web server
7493 run : |
7594 php -S localhost:8002 -t $(pwd) > /dev/null 2> /tmp/webserver_output.txt &
7695
96+ - name : Setup Nginx
97+ run : |
98+ sudo chmod o+w /etc/nginx/sites-available/default
99+ sudo cat tests/nginx_vhost_config > /etc/nginx/sites-available/default
100+ sudo systemctl restart nginx.service
101+
77102 - name : Wait for browser & PHP to start
78103 run : |
79104 while ! nc -z localhost 8002 </dev/null; do echo Waiting for PHP server to start...; sleep 1; done
Original file line number Diff line number Diff line change 1+ server {
2+ listen 80;
3+ listen 443 default_server ssl;
4+ server_name localhost;
5+
6+ ssl_certificate /home/runner/work/jira-api-restclient/jira-api-restclient/build/cert.pem;
7+ ssl_certificate_key /home/runner/work/jira-api-restclient/jira-api-restclient/build/key.pem;
8+
9+ if ($server_protocol = "HTTP/1.0") {
10+ return 426;
11+ }
12+
13+ location / {
14+ proxy_http_version 1.1;
15+ proxy_pass http://localhost:8002;
16+ proxy_set_header Host $host;
17+ proxy_set_header X-Real-IP $remote_addr;
18+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
19+ }
20+ }
You can’t perform that action at this time.
0 commit comments