CI: update perl-actions and actions/checkout #15
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
branches: [master] | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
continue-on-error: ${{ matrix.experimental }} | |
strategy: | |
matrix: | |
nginx: [1.16.1, 1.18.0, 1.20.2, 1.22.1, 1.24.0] | |
experimental: [false] | |
include: | |
- nginx: head | |
experimental: true | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install prove | |
uses: perl-actions/install-with-cpanm@v1.5 | |
with: | |
install: "Test::Nginx" | |
tests: false | |
- name: Install and test | |
env: | |
NGXVER: ${{ matrix.nginx }} | |
run: | | |
set -e | |
if [ "$NGXVER" = head ] | |
then | |
git clone https://github.com/nginx/nginx.git nginx-head | |
else | |
wget http://nginx.org/download/nginx-${NGXVER}.tar.gz && | |
tar xzvf nginx-${NGXVER}.tar.gz | |
fi | |
git clone https://github.com/openresty/echo-nginx-module.git | |
cd nginx-${NGXVER}/ | |
if [ "$NGXVER" = head ] | |
then | |
NGX_CONFIGURE=./auto/configure | |
else | |
NGX_CONFIGURE=./configure | |
fi | |
$NGX_CONFIGURE --add-module=.. --add-module=../echo-nginx-module | |
make -j2 | |
export PATH="$(pwd)/objs:$PATH" | |
cd - | |
cd test | |
prove -r t | |
set +e | |