-
Notifications
You must be signed in to change notification settings - Fork 89
69 lines (56 loc) · 2.01 KB
/
proxy-tests.yml
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
name: proxy-tests
on:
push:
branches: [master]
pull_request:
branches: [master]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: leafo/gh-actions-openresty@v1
with:
openrestyVersion: "1.19.9.1"
# - name: run resty
# run: resty -e 'print("hi from lua")'
# - name: run opm
# run: opm --cwd install leafo/pgmoon
# - uses: leafo/gh-actions-luarocks@v4
# with:
# withLuaPath: "/usr/local/openresty/luajit/"
- name: Set up Redis
uses: shogo82148/actions-setup-redis@v1
with:
redis-version: 6.2.6
- name: Set up Node
uses: actions/setup-node@v2
with:
node-version: 16.14.0
- name: Load dependencies
uses: actions/cache@v2
id: cache-node-dependencies
with:
path: node_modules
key: ${{ runner.os }}-${{ hashFiles('package-lock.json') }}
- name: Install Dependencies
if: steps.cache-node-dependencies.outputs.cache-hit != 'true'
env:
PUPETEER_PRODUCT: firefox
run: npm ci
- name: build openresty config
env:
NODE_PATH: /home/runner/work/Blot/Blot/app
NODE_SERVER_IP: 127.0.0.1
REDIS_IP: 127.0.0.1
SSL_CERTIFICATE: /home/runner/work/Blot/Blot/config/openresty/data/selfsigned.crt
SSL_CERTIFICATE_KEY: /home/runner/work/Blot/Blot/config/openresty/data/selfsigned.key
run: |
node config/openresty/build-config.js
cat config/openresty/data/openresty.conf
- name: generate self-signed SSL certs
run: |
openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout config/openresty/data/selfsigned.key -out config/openresty/data/selfsigned.crt -subj "/C=US/ST=Oregon/L=Portland/O=Company Name/OU=Org/CN=localhost"
- name: run openresty
run: |
sudo $(which openresty) -c /home/runner/work/Blot/Blot/config/openresty/data/openresty.conf