mirror of
https://github.com/potats0/lua-resty-coraza.git
synced 2025-06-28 17:41:00 +03:00
46 lines
945 B
YAML
46 lines
945 B
YAML
name: CI
|
|
|
|
on: [push]
|
|
|
|
jobs:
|
|
build-and-test:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Clone repository
|
|
uses: actions/checkout@master
|
|
with:
|
|
submodules: 'recursive'
|
|
|
|
- name: Setup Go
|
|
uses: actions/setup-go@master
|
|
with:
|
|
go-version: 1.20.4
|
|
|
|
- name: Clone libcoraza-nginx repository
|
|
uses: actions/checkout@v2
|
|
with:
|
|
repository: potats0/coraza
|
|
path: libcoraza
|
|
|
|
- name: Install build dependencies
|
|
run: |
|
|
cd libcoraza
|
|
./build.sh
|
|
./configure
|
|
make
|
|
sudo make install
|
|
sudo cpan -T Test::Nginx
|
|
sudo cpan -T Test::Nginx::Socket
|
|
|
|
- name: Setup openresty
|
|
uses: leafo/gh-actions-openresty@v1
|
|
with:
|
|
openrestyVersion: "1.21.4.1"
|
|
|
|
- name: run test::Nginx
|
|
run: |
|
|
export PATH=/usr/local/openresty/nginx/sbin:$PATH
|
|
openresty -v
|
|
prove -t
|