apisix/.github/workflows/fuzzing-ci.yaml
Shuyang Wu 5e74ae1650
ci: fix more concurrency problem (#4731)
Signed-off-by: yiyiyimu <wosoyoung@gmail.com>
2021-08-02 09:32:03 +08:00

85 lines
2.0 KiB
YAML

name: fuzzing
on:
push:
branches:
- master
paths-ignore:
- 'docs/**'
pull_request:
branches:
- master
paths-ignore:
- 'docs/**'
concurrency:
group: ${{ github.workflow }}-${{ github.ref == 'refs/heads/master' && github.run_number || github.ref }}
cancel-in-progress: true
jobs:
test_apisix:
name: run fuzzing
runs-on: ubuntu-latest
services:
etcd:
image: bitnami/etcd:3.4.0
ports:
- 2379:2379
- 2380:2380
env:
ALLOW_NONE_AUTHENTICATION: yes
ETCD_ADVERTISE_CLIENT_URLS: http://0.0.0.0:2379
steps:
- name: Check out code
uses: actions/checkout@v2.3.4
with:
submodules: recursive
- name: Cache deps
uses: actions/cache@v2.1.6
env:
cache-name: cache-deps
with:
path: deps
key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('rockspec/apisix-master-0.rockspec') }}
- name: run apisix
run: |
wget -qO - https://openresty.org/package/pubkey.gpg | sudo apt-key add -
sudo apt-get update
sudo apt-get -y install software-properties-common
sudo add-apt-repository -y "deb http://openresty.org/package/ubuntu $(lsb_release -sc) main"
sudo apt-get update
sudo apt-get install -y git openresty curl openresty-openssl111-dev unzip make gcc
./utils/linux-install-luarocks.sh
make deps
make init
make run
- name: run upstream
run: |
sudo openresty -c $PWD/t/fuzzing/upstream/nginx.conf
- name: install boofuzz
run: |
pip install -r $PWD/t/fuzzing/requirements.txt
- name: run simpleroute test
run: |
python $PWD/t/fuzzing/simpleroute_test.py
- name: run serverless route test
run: |
python $PWD/t/fuzzing/serverless_route_test.py
- name: run vars route test
run: |
python $PWD/t/fuzzing/vars_route_test.py
- name: run client abort test
run: |
python $PWD/t/fuzzing/client_abort.py