fix: check for invalid characters in path, query and headers (#24) #60
This file contains hidden or 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: Test | |
| on: [push, pull_request] | |
| jobs: | |
| luacheck: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - name: Install LuaRocks | |
| run: | | |
| sudo apt -y install lua5.1 liblua5.1-0-dev | |
| curl -fsSL https://raw.githubusercontent.com/apache/apisix/master/utils/linux-install-luarocks.sh | bash | |
| - run: sudo luarocks install luacheck | |
| - run: luacheck lib | |
| run_tests: | |
| strategy: | |
| matrix: | |
| openresty_version: | |
| - 1.17.8.1 | |
| - 1.19.3.1 | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Install deps | |
| run: | | |
| wget -O - https://openresty.org/package/pubkey.gpg | sudo apt-key add - | |
| echo "deb http://openresty.org/package/ubuntu $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/openresty.list | |
| sudo apt-get update | |
| sudo apt-get -y install openresty | |
| sudo apt-get -y install curl perl bash wget git libperl-dev libarchive-tools | |
| curl -fsSL https://raw.githubusercontent.com/apache/apisix/master/utils/linux-install-luarocks.sh | bash | |
| - name: Install CPAN | |
| run: sudo apt install -y cpanminus | |
| - name: Cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cpan | |
| ~/.cache | |
| key: ${{ runner.os }}-${{ matrix.openresty_version }}-cache | |
| - name: Install Test::Nginx | |
| run: sudo cpanm -q -n Test::Nginx | |
| - name: Install Luacov | |
| run: sudo luarocks install luacov | |
| - uses: actions/checkout@v2 | |
| - name: Run tests | |
| env: | |
| TEST_COVERAGE: '1' | |
| run: | | |
| export PATH=/usr/local/openresty/nginx/sbin:/usr/local/openresty/luajit/bin:$PATH | |
| /usr/bin/prove -I../test-nginx/lib t/*.t | |
| - name: Coverage | |
| run: | | |
| luacov | |
| tail -n 8 luacov.report.out |