Skip to content

Commit 7bbf9e5

Browse files
feat: github action workflow
2 parents 7f9f33e + 510ed38 commit 7bbf9e5

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed

.github/workflows/test.yaml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: test
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
9+
jobs:
10+
test:
11+
runs-on: "ubuntu-20.04"
12+
env:
13+
OPENRESTY_PREFIX: "/usr/local/openresty"
14+
15+
steps:
16+
- name: Check out code
17+
uses: actions/[email protected]
18+
with:
19+
submodules: recursive
20+
21+
- name: Linux Get dependencies
22+
run: |
23+
sudo apt install -y cpanminus build-essential libncurses5-dev libreadline-dev libssl-dev perl lua5.1 liblua5.1-0-dev
24+
25+
- name: Linux Before install
26+
run: |
27+
sudo cpanm --notest Test::Nginx > build.log 2>&1 || (cat build.log && exit 1)
28+
29+
- name: Linux Install
30+
run: |
31+
wget -qO - https://openresty.org/package/pubkey.gpg | sudo apt-key add -
32+
sudo apt-get -y install software-properties-common
33+
sudo add-apt-repository -y "deb http://openresty.org/package/ubuntu $(lsb_release -sc) main"
34+
sudo apt-get update
35+
sudo apt-get install openresty
36+
git clone https://github.com/openresty/test-nginx.git test-nginx
37+
38+
- name: Linux Script
39+
run: |
40+
export PATH=$OPENRESTY_PREFIX/nginx/sbin:$PATH
41+
make test

0 commit comments

Comments
 (0)