Skip to content

fix test

fix test #159

Workflow file for this run

name: CI
on: push
jobs:
fmt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: goto-bus-stop/setup-zig@v1
with:
version: master
- run: zig fmt --check *.zig src/*.zig
test:
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
runs-on: ${{matrix.os}}
steps:
- uses: actions/checkout@v3
- uses: goto-bus-stop/setup-zig@v1
with:
version: master
- run: zig build test
macos-with-openssl:
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- name: install dependencies
run: |
./install_macos.sh
- name: run tests
run: |
source ~/.bashrc
./test.sh
./test_server.sh
# thanks to https://github.com/docker/build-push-action/issues/225
create-container:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: docker/setup-buildx-action@v2
- uses: docker/build-push-action@v2
with:
file: Dockerfile
tags: tls13-zig:tls13zig_base
push: false
load: true
cache-from: type=gha,scope=buildx-${{ github.workflow }}-${{ github.job }}
cache-to: type=gha,mode=max,scope=buildx-${{ github.workflow }}-${{ github.job }}
outputs: type=docker,dest=/tmp/tls13-zig.tar
- uses: actions/upload-artifact@v2
with:
name: tls13-zig
path: /tmp/tls13-zig.tar
client-e2e-test-with-openssl:
runs-on: ubuntu-latest
needs: create-container
steps:
- uses: actions/checkout@v3
- uses: docker/setup-buildx-action@v2
- uses: actions/download-artifact@v2
with:
name: tls13-zig
path: /tmp
- name: Load docker image
run: |
docker load --input /tmp/tls13-zig.tar
docker image ls -a
- uses: addnab/docker-run-action@v3
with:
image: tls13-zig:tls13zig_base
run: /tls13-zig/test.sh
server-e2e-test-with-openssl:
runs-on: ubuntu-latest
needs: create-container
steps:
- uses: actions/checkout@v3
- uses: docker/setup-buildx-action@v2
- uses: actions/download-artifact@v2
with:
name: tls13-zig
path: /tmp
- name: Load docker image
run: |
docker load --input /tmp/tls13-zig.tar
docker image ls -a
- uses: addnab/docker-run-action@v3
with:
image: tls13-zig:tls13zig_base
run: /tls13-zig/test_server.sh
client-test-stream:
strategy:
matrix:
cipher: [TLS_AES_128_GCM_SHA256, TLS_AES_256_GCM_SHA384, TLS_CHACHA20_POLY1305_SHA256]
runs-on: ubuntu-latest
needs: create-container
steps:
- uses: actions/checkout@v3
- uses: docker/setup-buildx-action@v2
- uses: actions/download-artifact@v2
with:
name: tls13-zig
path: /tmp
- name: Load docker image
run: |
docker load --input /tmp/tls13-zig.tar
docker image ls -a
- uses: addnab/docker-run-action@v3
with:
image: tls13-zig:tls13zig_base
run: /tls13-zig/test_stream.sh ${{matrix.cipher}}
server-test-stream:
runs-on: ubuntu-latest
needs: create-container
steps:
- uses: actions/checkout@v3
- uses: docker/setup-buildx-action@v2
- uses: actions/download-artifact@v2
with:
name: tls13-zig
path: /tmp
- name: Load docker image
run: |
docker load --input /tmp/tls13-zig.tar
docker image ls -a
- uses: addnab/docker-run-action@v3
with:
image: tls13-zig:tls13zig_base
run: /tls13-zig/test_stream_server.sh
client-test-stress:
strategy:
matrix:
cipher: [TLS_AES_128_GCM_SHA256, TLS_AES_256_GCM_SHA384, TLS_CHACHA20_POLY1305_SHA256]
runs-on: ubuntu-latest
needs: create-container
steps:
- uses: actions/checkout@v3
- uses: docker/setup-buildx-action@v2
- uses: actions/download-artifact@v2
with:
name: tls13-zig
path: /tmp
- name: Load docker image
run: |
docker load --input /tmp/tls13-zig.tar
docker image ls -a
- uses: addnab/docker-run-action@v3
with:
image: tls13-zig:tls13zig_base
run: /tls13-zig/test_stress.sh ${{matrix.cipher}}
server-test-stress:
runs-on: ubuntu-latest
needs: create-container
steps:
- uses: actions/checkout@v3
- uses: docker/setup-buildx-action@v2
- uses: actions/download-artifact@v2
with:
name: tls13-zig
path: /tmp
- name: Load docker image
run: |
docker load --input /tmp/tls13-zig.tar
docker image ls -a
- uses: addnab/docker-run-action@v3
with:
image: tls13-zig:tls13zig_base
run: /tls13-zig/test_stress_server.sh