test: integration tests for example modules #1
Workflow file for this run
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: Modules | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
env: | |
CARGO_TERM_COLOR: always | |
RUST_BACKTRACE: '1' | |
NGX_CONFIGURE_CMD: | | |
auto/configure | |
--with-compat | |
--with-debug | |
--with-http_realip_module | |
--with-http_ssl_module | |
--with-http_v2_module | |
--with-http_v3_module | |
--with-stream | |
--with-stream_realip_module | |
--with-stream_ssl_module | |
--with-threads | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
nginx-ref: | |
- master | |
# stable-1.26 | |
env: | |
TEST_NGINX_BINARY: ${{ github.workspace }}/nginx/objs/nginx | |
TEST_NGINX_MODULES: ${{ github.workspace }}/nginx/objs | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/checkout@v4 | |
with: | |
ref: ${{ matrix.nginx-ref }} | |
repository: 'nginx/nginx' | |
path: 'nginx' | |
- uses: actions/checkout@v4 | |
with: | |
repository: 'nginx/nginx-tests' | |
path: 'nginx/tests' | |
sparse-checkout: | | |
lib | |
- uses: dtolnay/rust-toolchain@stable | |
- uses: actions/cache@v4 | |
with: | |
path: | | |
~/.cargo/bin/ | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
nginx/objs/ngx_rust_examples | |
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
restore-keys: ${{ runner.os }}-cargo- | |
- name: configure nginx | |
working-directory: nginx | |
run: | | |
${NGX_CONFIGURE_CMD} \ | |
--add-dynamic-module=${{ github.workspace }}/examples | |
- name: build nginx | |
working-directory: nginx | |
run: make | |
- name: run tests | |
run: prove -r -v -I nginx/tests/lib examples/t |