From dd4a39ebd676540a4264a8aaf5f4f9cf117e3883 Mon Sep 17 00:00:00 2001 From: Danila Vershinin Date: Sun, 20 Nov 2022 15:42:15 +0800 Subject: [PATCH] Testing via GitHub Actions --- .github/FUNDING.yml | 12 +++++++++++ .github/workflows/build.yml | 40 +++++++++++++++++++++++++++++++++++++ 2 files changed, 52 insertions(+) create mode 100644 .github/FUNDING.yml create mode 100644 .github/workflows/build.yml diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 0000000..cda375a --- /dev/null +++ b/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: GetPageSpeed +patreon: getpagespeed +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..3ff7ba0 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,40 @@ +name: Test Build + +on: [push, pull_request] + +jobs: + build: + + runs-on: ubuntu-latest + strategy: + max-parallel: 2 + matrix: + nginx-branch: [stable, mainline] + steps: + - uses: actions/checkout@v2 + + - name: Install build and test dependencies + run: | + sudo apt-get --yes update + sudo apt-get install --yes libpcre3-dev libssl-dev perl cpanminus + sudo pip install lastversion + + - name: Download NGINX + run: | + mkdir nginx && cd nginx && lastversion unzip nginx:${{ matrix.nginx-branch }} + + - name: Configure NGINX to compile with the module statically + run: | + cd nginx && ./configure --with-debug --add-module=.. + + - name: Make NGINX + run: | + cd nginx && make -j$(nproc) + + - name: Ensure Test::Nginx installed + run: | + cpanm --notest --local-lib=$HOME/perl5 Test::Nginx + + - name: Test the module + run: | + PATH=$(pwd)/nginx/objs:$PATH PERL5LIB=$HOME/perl5/lib/perl5 TEST_NGINX_VERBOSE=true prove -v