Skip to content

Commit

Permalink
add functional tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jimf5 committed Aug 11, 2023
1 parent f6f2525 commit 724bc64
Show file tree
Hide file tree
Showing 7 changed files with 2,875 additions and 0 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/nginx-otel-module-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,54 @@ jobs:
with:
name: nginx-otel-module
path: build/ngx_otel_module.so
- name: Archive protoc and opentelemetry-proto
uses: actions/upload-artifact@v3
with:
name: protoc-opentelemetry-proto
path: |
build/_deps/grpc-build/third_party/protobuf/protoc
build/_deps/otelcpp-src/third_party/opentelemetry-proto
test-module:
needs: build-module
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Download module
uses: actions/download-artifact@v3
with:
name: nginx-otel-module
path: build
- name: Download protoc and opentelemetry-proto
uses: actions/download-artifact@v3
with:
name: protoc-opentelemetry-proto
path: build/_deps
- name: List files
run: ls -laR .
- name: Fix protoc rights
run: chmod +x build/_deps/grpc-build/third_party/protobuf/protoc
- name: Install perl modules
run: sudo cpan IO::Socket::SSL Crypt::Misc
- name: Download otelcol
run: |
curl -LO https://github.com/\
open-telemetry/opentelemetry-collector-releases/releases/download/\
v0.76.1/otelcol_0.76.1_linux_amd64.tar.gz
tar -xzf otelcol_0.76.1_linux_amd64.tar.gz
- name: Checkout nginx and nginx-test
run: |
hg clone http://hg.nginx.org/nginx/
hg clone http://hg.nginx.org/nginx-tests/
- name: Build nginx
working-directory: nginx
run: |
auto/configure --with-compat --with-debug --with-http_ssl_module \
--with-http_v2_module --with-http_v3_module
make -j 4
- name: Run tests
working-directory: tests
run: |
PERL5LIB=../nginx-tests/lib TEST_NGINX_UNSAFE=1 \
TEST_NGINX_VERBOSE=1 TEST_NGINX_GLOBALS="load_module \
${PWD}/../build/ngx_otel_module.so;" prove -v .
Loading

0 comments on commit 724bc64

Please sign in to comment.