refactor: HTTP client: unified support for HTTP/HTTPS and Unix sockets #204
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: lua ca bouncer nginx test | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - releases/** | |
| pull_request: | |
| branches: | |
| - main | |
| - releases/** | |
| jobs: | |
| tests: | |
| runs-on: ubuntu-latest | |
| name: "Nginx test suite" | |
| container: | |
| image: debian:latest | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| submodules: false | |
| - name: "install nginx & nginx perl test suite" | |
| run: | | |
| cat /etc/os-release | |
| apt-get update | |
| apt-get install -y make gcc nginx libnginx-mod-http-lua perl ca-certificates luarocks | |
| luarocks install lua-cjson 2.1.0.10-1 | |
| luarocks install lua-resty-http 0.17.1-0 | |
| cpan Test::Nginx | |
| cpan Test::Nginx::Socket | |
| echo "Installation done" | |
| - name: "install mkcert" | |
| run: | | |
| wget -O mkcert-latest-linux-amd64 "https://dl.filippo.io/mkcert/latest?for=linux/amd64" | |
| chmod +x mkcert-latest-linux-amd64 | |
| cp mkcert-latest-linux-amd64 /usr/local/bin/mkcert | |
| - name: "generate local CA" | |
| run: | | |
| mkdir -p /tmp/ca-test | |
| export CAROOT=/tmp/ca-test | |
| mkcert -install | |
| mkcert -key-file /tmp/ca-test/server-key.pem -cert-file /tmp/ca-test/server-cert.pem localhost 127.0.0.1 | |
| mkcert -client -key-file /tmp/ca-test/client-key.pem -cert-file /tmp/ca-test/client-cert.pem bouncer | |
| - name: "Run tests" | |
| run: | | |
| export PERL5LIB=/root/.cpan/build/Test-Nginx-0.30-3/blib/lib | |
| for i in t/*.t; do | |
| prove $i ; | |
| done |