chore(*): remove Bazel and bump dependencies, release v1.7.0
#987
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: Tests | |
on: | |
pull_request: {} | |
push: | |
branches: | |
- main | |
# cancel previous runs if new commits are pushed to the PR, but run for each commit on master | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
cancel-in-progress: true | |
jobs: | |
tests: | |
name: Tests | |
runs-on: ubuntu-20.04 | |
strategy: | |
matrix: | |
openresty: | |
- '1.25.3.2' | |
- '1.25.3.1' | |
- '1.21.4.4' | |
- '1.21.4.3' | |
- '1.21.4.2' | |
- '1.21.4.1' | |
env: | |
JOBS: 1 | |
OPENRESTY: ${{ matrix.openresty }} | |
CODE_PATH: ${{ github.workspace }} | |
BASE_PATH: /home/runner/work/cache | |
steps: | |
- name: Checkout source code | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
token: ${{ secrets.GHA_KONG_BOT_READ_TOKEN }} | |
- name: Make sure Cargo can clone private repositories | |
run: | | |
git config --global url."https://${{ secrets.GHA_KONG_BOT_READ_TOKEN }}@github.com".insteadOf https://github.com | |
- name: Setup cache | |
uses: actions/cache@v2 | |
id: cache-deps | |
with: | |
path: | | |
${{ env.BASE_PATH }} | |
key: ${{ runner.os }}-${{ hashFiles('Makefile') }}-${{ hashFiles('**/tests.yml') }}-openresty-${{ matrix.openresty }} | |
- name: Install packages | |
run: | | |
sudo apt update | |
sudo apt-get install -qq -y wget cpanminus net-tools libpcre3-dev build-essential valgrind | |
if [ ! -e perl ]; then sudo cpanm --notest Test::Nginx > build.log 2>&1 || (cat build.log && exit 1); cp -r /usr/local/share/perl/ .; else sudo cp -r perl /usr/local/share; fi | |
- name: Download OpenResty | |
if: steps.cache-deps.outputs.cache-hit != 'true' | |
run: | | |
wget https://openresty.org/download/openresty-${OPENRESTY}.tar.gz | |
mkdir -p ${BASE_PATH} | |
tar xfz openresty-${OPENRESTY}.tar.gz -C ${BASE_PATH} | |
- name: Setup tools | |
if: steps.cache-deps.outputs.cache-hit != 'true' | |
run: | | |
cd ${BASE_PATH}/openresty-${OPENRESTY} | |
./configure --prefix=${BASE_PATH}/openresty --with-debug | |
sudo make -j$(nproc) && make install -j$(nproc) | |
- name: Run Test | |
run: | | |
export PATH=${BASE_PATH}/openresty/bin:$PATH | |
openresty -V | |
make test OPENRESTY_PREFIX=${BASE_PATH}/openresty | |
- name: Run Valgrind | |
run: | | |
export PATH=${BASE_PATH}/openresty/bin:$PATH | |
export TEST_NGINX_VALGRIND='--num-callers=100 -q --tool=memcheck --leak-check=full --show-possibly-lost=no --gen-suppressions=all --suppressions=valgrind.suppress --track-origins=yes' TEST_NGINX_TIMEOUT=120 TEST_NGINX_SLEEP=1 | |
export TEST_NGINX_USE_VALGRIND=1 | |
openresty -V | |
make valgrind OPENRESTY_PREFIX=${BASE_PATH}/openresty |