Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
454f76c
alpine: drop prerequisites-for-module targets
thresheek Jul 30, 2026
b45464f
Split the jobs to base and modules
thresheek Aug 10, 2026
bb9fae5
CI: User a proper init for almalinux container
thresheek Aug 10, 2026
4c16ddf
Added acme and njs tests
thresheek Jul 22, 2026
f3ae07e
Implement dependencies for test targets
thresheek Aug 11, 2026
ea96f2f
Added AGENTS.md
thresheek Jul 29, 2026
aac799b
Always provide Test::Nginx location to prove invocations
thresheek Aug 11, 2026
5d66bf8
CI: redhat: Supply current user to launch nginx workers with
thresheek Aug 11, 2026
efc13ca
contrib: added pkg-oss-tests
thresheek Aug 13, 2026
90747fe
Implement tests contrib dependencies
thresheek Aug 13, 2026
6921f1a
Allow testdir to be absolute
thresheek Aug 13, 2026
68d1210
set-misc: test with pkg-oss-tests suite
thresheek Aug 13, 2026
bf92af7
encrypted-session: test with pkg-oss-tests suite
thresheek Aug 13, 2026
3233a8c
headers-more: test with pkg-oss-tests suite
thresheek Aug 13, 2026
1741fb9
subs-filter: test with pkg-oss-tests suite
thresheek Aug 14, 2026
a2b89df
brotli: test with pkg-oss-tests suite
thresheek Aug 14, 2026
1860bf2
fips-check: test with pkg-oss-tests suite
thresheek Aug 14, 2026
37370a5
geoip2: test with pkg-oss-tests suite
thresheek Aug 14, 2026
9e24b8a
lua: test with pkg-oss-tests suite
thresheek Aug 14, 2026
881ebb6
tests: pass lua-specific directives when running lua module tests
thresheek Aug 17, 2026
944b432
auth-spnego: test with pkg-oss-tests suite
thresheek Aug 17, 2026
d24c039
rtmp: test with pkg-oss-tests suite
thresheek Aug 17, 2026
3fd8cca
CI: install auth-spnego tests dependencies
thresheek Aug 18, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/test-env/module-acme.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash

PEBBLE=$(find "$GITHUB_WORKSPACE" -path "*/nginx-acme-*/build/get-pebble.pl" -type f 2>/dev/null | head -1)
[ -n "$PEBBLE" ] && echo "TEST_NGINX_PEBBLE_BINARY=$(perl "$PEBBLE")" >> "$GITHUB_ENV"
271 changes: 252 additions & 19 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
for target in $(make list-all-modules | cut -d ' ' -f 1); do
targets="$targets module-$target";
done
echo targets="base $targets" >> $GITHUB_ENV
echo targets="$targets" >> $GITHUB_ENV

- name: set-matrix
id: set-matrix
Expand All @@ -38,8 +38,58 @@ jobs:
jq -nRr '"matrix-" + $os +"=" + ( { include: [ $ARGS.positional[] | {target: . } ] } | tojson)' --arg os $os --args ${targets/ module-geoip/} >> $GITHUB_OUTPUT
done

alpine:
alpine-base:
runs-on: ubuntu-24.04
needs: generate-matrix
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7

- name: Setup Alpine Linux
uses: jirutka/setup-alpine@ae3b3ddba35054804fc4a3507b519fa7e8152050 #v1
with:
branch: v3.20
packages: >
abuild
build-base
coreutils
curl
findutils
git
make
xz

- name: Create build depends for base
shell: alpine.sh {0}
working-directory: alpine
run: |
make abuild-base

- name: Install build depends for base
shell: alpine.sh --root {0}
working-directory: alpine
run: |
apk add $(. ./abuild-base/APKBUILD; echo $makedepends;)

- name: Build base
shell: alpine.sh {0}
working-directory: alpine
run: |
make base

- name: Upload nginx binary
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: nginx-binary-alpine
path: alpine/base/nginx

- name: List what has been built
shell: alpine.sh {0}
if: ${{ !cancelled() }}
run: |
find ~/packages/alpine -type f | xargs ls -ld

alpine:
needs: [generate-matrix, alpine-base]
runs-on: ubuntu-24.04
strategy:
fail-fast: false
Expand All @@ -60,8 +110,21 @@ jobs:
findutils
git
make
perl
perl-io-socket-ssl
perl-io-socket-inet6
perl-utils
perl-cryptx
perl-dev
perl-fcgi
perl-parse-recdescent
perl-protocol-websocket
rustup
xz
krb5-server
krb5
krb5-dev
perl-gssapi

- name: Install Rust toolchain
shell: alpine.sh {0}
Expand All @@ -85,15 +148,81 @@ jobs:
run: |
make ${{ matrix.target }}

- name: Download nginx binary
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
with:
name: nginx-binary-alpine
path: alpine/base

- name: Setup test environment for ${{ matrix.target }}
run: |
SETUP="$GITHUB_WORKSPACE/.github/test-env/${{ matrix.target }}.sh"
if [ -f "$SETUP" ]; then bash "$SETUP"; fi

- name: Test ${{ matrix.target }}
env:
TEST_NGINX_BINARY: "${{ github.workspace }}/alpine/base/nginx"
shell: alpine.sh {0}
working-directory: alpine
run: |
MODULE=${{ matrix.target }}
MODULE=${MODULE#module-}
chmod +x "$TEST_NGINX_BINARY"
touch module-${MODULE}
make test-module-${MODULE}

- name: List what has been built
shell: alpine.sh {0}
if: ${{ !cancelled() }}
run: |
find ~/packages/alpine -type f | xargs ls -ld

ubuntu:
ubuntu-base:
runs-on: ubuntu-24.04
needs: generate-matrix
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7

- name: Setup Ubuntu
run: |
sudo apt-get update
sudo apt-get install -y --no-install-suggests --no-install-recommends \
curl \
devscripts \
equivs \
git \
libxml2-utils \
lsb-release \
xsltproc

- name: Install Rust toolchain
uses: actions-rust-lang/setup-rust-toolchain@150fca883cd4034361b621bd4e6a9d34e5143606 #v1
with:
toolchain: 1.86.0

- name: Build base
working-directory: debian
run: |
NGINX_VERSION=$(make --eval 'nv:; @echo $(BASE_VERSION)' nv)
make rules-base
sudo mk-build-deps --install --tool="apt-get -o Debug::pkgProblemResolver=yes --no-install-recommends --yes" \
debuild-base/nginx-${NGINX_VERSION}/debian/control
make base

- name: Upload nginx binary
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: nginx-binary-ubuntu
path: debian/base/nginx

- name: List what has been built
if: ${{ !cancelled() }}
run: |
find .. -mindepth 1 -maxdepth 1 -name "*.deb" | xargs ls -ld

ubuntu:
runs-on: ubuntu-24.04
needs: [generate-matrix, ubuntu-base]
strategy:
fail-fast: false
matrix: ${{fromJson(needs.generate-matrix.outputs.matrix-ubuntu)}}
Expand All @@ -109,9 +238,16 @@ jobs:
devscripts \
equivs \
git \
libio-socket-ssl-perl \
libio-socket-inet6-perl \
libxml2-utils \
lsb-release \
xsltproc
xsltproc \
krb5-kdc \
krb5-admin-server \
krb5-user \
libkrb5-dev \
libgssapi-perl

- name: Install Rust toolchain
uses: actions-rust-lang/setup-rust-toolchain@150fca883cd4034361b621bd4e6a9d34e5143606 #v1
Expand All @@ -127,15 +263,85 @@ jobs:
debuild-${{ matrix.target }}/nginx-${NGINX_VERSION}/debian/control
make ${{ matrix.target }}

- name: Download nginx binary
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
with:
name: nginx-binary-ubuntu
path: debian/base

- name: Setup test environment for ${{ matrix.target }}
run: |
SETUP="$GITHUB_WORKSPACE/.github/test-env/${{ matrix.target }}.sh"
if [ -f "$SETUP" ]; then bash "$SETUP"; fi

- name: Test ${{ matrix.target }}
env:
TEST_NGINX_BINARY: "${{ github.workspace }}/debian/base/nginx"
working-directory: debian
run: |
MODULE=${{ matrix.target }}
MODULE=${MODULE#module-}
chmod +x "$TEST_NGINX_BINARY"
touch module-${MODULE}
make test-module-${MODULE}

- name: List what has been built
if: ${{ !cancelled() }}
run: |
find .. -mindepth 1 -maxdepth 1 -name "*.deb" | xargs ls -ld

redhat:
needs: generate-matrix
redhat-base:
runs-on: ubuntu-24.04
needs: generate-matrix
container: almalinux:9
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7

- name: Setup AlmaLinux
run: |
dnf makecache
dnf install -y \
g++ \
gcc \
git \
epel-release \
libxslt \
make \
rpm-build \
which \
xz \
'dnf-command(config-manager)'
dnf config-manager --set-enabled crb

- name: Install Rust toolchain
uses: actions-rust-lang/setup-rust-toolchain@150fca883cd4034361b621bd4e6a9d34e5143606 #v1
with:
toolchain: 1.86.0

- name: Build base
working-directory: rpm/SPECS
run: |
make nginx.spec
dnf -y builddep ./nginx.spec
make base

- name: Upload nginx binary
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: nginx-binary-redhat
path: rpm/SPECS/base/nginx

- name: List what has been built
if: ${{ !cancelled() }}
run: |
find rpm/RPMS -type f | xargs ls -ld

redhat:
needs: [generate-matrix, redhat-base]
runs-on: ubuntu-24.04
container:
image: almalinux:9
options: --init
strategy:
fail-fast: false
matrix: ${{fromJson(needs.generate-matrix.outputs.matrix-redhat )}}
Expand All @@ -146,18 +352,30 @@ jobs:
- name: Setup AlmaLinux
run: |
dnf makecache
dnf install -y epel-release 'dnf-command(config-manager)'
dnf config-manager --set-enabled crb
dnf install -y \
g++ \
gcc \
git \
epel-release \
libxslt \
make \
perl \
perl-Digest-MD5 \
perl-ExtUtils-Embed \
perl-IO-Compress \
perl-IO-Socket-INET6 \
perl-IO-Socket-SSL \
perl-JSON \
perl-JSON-PP \
perl-Test-Simple \
rpm-build \
which \
xz \
'dnf-command(config-manager)'
dnf config-manager --set-enabled crb
krb5-server \
krb5-workstation \
krb5-devel \
perl-GSSAPI

- name: Install Rust toolchain
uses: actions-rust-lang/setup-rust-toolchain@150fca883cd4034361b621bd4e6a9d34e5143606 #v1
Expand All @@ -167,18 +385,33 @@ jobs:
- name: Create and install build depends for ${{ matrix.target }} and build it
working-directory: rpm/SPECS
run: |
case ${{ matrix.target }} in
base)
spec="nginx.spec"
;;
*)
spec="nginx-${{ matrix.target }}.spec"
;;
esac
make $spec
dnf -y builddep ./${spec}
make nginx-${{ matrix.target }}.spec
dnf -y builddep ./nginx-${{ matrix.target }}.spec
make ${{ matrix.target }}

- name: Download nginx binary
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
with:
name: nginx-binary-redhat
path: rpm/SPECS/base

- name: Setup test environment for ${{ matrix.target }}
run: |
SETUP="$GITHUB_WORKSPACE/.github/test-env/${{ matrix.target }}.sh"
if [ -f "$SETUP" ]; then bash "$SETUP"; fi

- name: Test ${{ matrix.target }}
env:
TEST_NGINX_BINARY: "${{ github.workspace }}/rpm/SPECS/base/nginx"
TEST_NGINX_GLOBALS: "user root;"
working-directory: rpm/SPECS
run: |
MODULE=${{ matrix.target }}
MODULE=${MODULE#module-}
chmod +x "$TEST_NGINX_BINARY"
touch module-${MODULE}
make test-module-${MODULE}

- name: List what has been built
if: ${{ !cancelled() }}
run: |
Expand Down
Loading
Loading