Skip to content

Commit 302d3ff

Browse files
authored
Create test.yml
1 parent 2ef4444 commit 302d3ff

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

.github/workflows/test.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: "[CI.Lint] Run test on Push"
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
run-test:
10+
name: Run Test
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout Code
14+
uses: actions/checkout@v4
15+
16+
- name: Install openresty
17+
run: |
18+
sudo systemctl disable nginx
19+
sudo systemctl stop nginx
20+
21+
sudo apt-get -y install --no-install-recommends wget gnupg ca-certificates lsb-release
22+
wget -O - https://openresty.org/package/pubkey.gpg | sudo gpg --dearmor -o /usr/share/keyrings/openresty.gpg
23+
24+
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/openresty.gpg] http://openresty.org/package/ubuntu $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/openresty.list > /dev/null
25+
sudo apt-get update
26+
27+
sudo apt-get -y install openresty
28+
29+
- name: Install Openrety Test framekwork
30+
run: |
31+
sudo apt-get update
32+
sudo apt-get install -y make cpanminus libtest-nginx-perl
33+
34+
sudo cpanm --notest Test::Nginx
35+
36+
- name: Verify Test::Nginx installation
37+
run: |
38+
perl -MTest::Nginx -e 'print "Test::Nginx is installed\n"'

0 commit comments

Comments
 (0)