sync subscription next #485
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: TLS tests | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
timeout-minutes: 15 | |
strategy: | |
matrix: | |
julia-version: ['1.10'] | |
julia-arch: [x64] | |
nats-version: ['2.10.18'] | |
julia-num-threads: ['1', '1,1', '2,1', '4,1'] | |
os: [ubuntu-latest] | |
services: | |
nats-no-tls: | |
image: nats:${{ matrix.nats-version }} | |
steps: | |
- uses: actions/checkout@v2 | |
- name: "Start TLS enabled NATS server." | |
run: | | |
echo $PWD | |
name=`docker create -v $(pwd)/test/certs:/certs -v $(pwd)/test/configs:/configs --network ${{ job.container.network }} --name nats --network-alias nats -p 4222:4222 -e GITHUB_ACTIONS=true -e CI=true nats:${{ matrix.nats-version }} -c /configs/nats-server-tls-auth.conf` | |
docker container start $name | |
sleep 2 | |
docker logs $name | |
- name: "Start reply service" | |
run: | | |
docker ps | |
name=`docker create -v $(pwd)/test/certs:/certs --network ${{ job.container.network }} -e GITHUB_ACTIONS=true -e CI=true --entrypoint nats synadia/nats-box:latest --server nats:4222 --tlsca /certs/nats.crt --tlscert /certs/client.crt --tlskey /certs/client.key reply help.please 'OK, I CAN HELP!!!'` | |
container_id=`docker container start $name` | |
sleep 2 | |
docker logs $container_id | |
- uses: julia-actions/setup-julia@v1 | |
with: | |
version: ${{ matrix.julia-version }} | |
arch: ${{ matrix.julia-arch }} | |
- run: | | |
julia --project -e 'using Pkg; Pkg.instantiate()' | |
JULIA_DEBUG=NATS JULIA_NUM_THREADS=${{ matrix.julia-num-threads }} NATS_TLS_CA_PATH=test/certs/nats.crt NATS_TLS_CERT_PATH=test/certs/client.crt NATS_TLS_KEY_PATH=test/certs/client.key julia --color=yes --code-coverage=user --project test/runtests.jl | |
- uses: julia-actions/julia-processcoverage@v1 | |
# annotate: true | |
- name: Upload coverage reports to Codecov | |
uses: codecov/codecov-action@v4 | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
- run: | | |
julia --project -e 'using Pkg; Pkg.instantiate()' | |
JULIA_DEBUG=NATS JULIA_NUM_THREADS=${{ matrix.julia-num-threads }} NATS_TLS_CA_PATH=test/certs/nats.crt NATS_TLS_CERT_PATH=test/certs/client.crt NATS_TLS_KEY_PATH=test/certs/client.key julia --color=yes --code-coverage=user --project test/benchmarks.jl | |
- run: | | |
julia --project -e 'using Pkg; Pkg.instantiate()' | |
JULIA_DEBUG=NATS JULIA_NUM_THREADS=${{ matrix.julia-num-threads }} NATS_TLS_CA_PATH=test/certs/nats.crt NATS_TLS_CERT_PATH=test/certs/client.crt NATS_TLS_KEY_PATH=test/certs/client.key julia --color=yes --code-coverage=user --project test/chaos.jl | |
- name: "Stop services" | |
run: | | |
docker kill $(docker ps -q ) |