fix: check for invalid characters in path, query and headers #51
Workflow file for this run
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 | |
| container: | |
| image: openresty/openresty:${{ matrix.openresty_version }}-alpine-fat | |
| # --init runs tinit as PID 1 and prevents the 'WARNING: killing the child process' spam from the test suite | |
| options: --init | |
| steps: | |
| - name: Install deps | |
| run: | | |
| apk add --no-cache curl perl bash wget git perl-dev libarchive-tools | |
| ln -s /usr/bin/bsdtar /usr/bin/tar | |
| - name: Install CPAN | |
| run: 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: cpanm -q -n Test::Nginx | |
| - name: Install Luacov | |
| run: luarocks install luacov | |
| - uses: actions/checkout@v2 | |
| - name: Run tests | |
| env: | |
| TEST_COVERAGE: '1' | |
| run: /usr/bin/prove -I../test-nginx/lib t/*.t | |
| - name: Coverage | |
| run: | | |
| luacov | |
| tail -n 8 luacov.report.out |