Skip to content

Commit c10ce08

Browse files
committed
Copy action into neqo repo
For now until quic-interop/quic-interop-runner#356 is merged.
1 parent b9191aa commit c10ce08

File tree

2 files changed

+113
-1
lines changed

2 files changed

+113
-1
lines changed
Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
name: 'QUIC Interop Runner Action'
2+
description: 'Run the QUIC Interop Runner tests.'
3+
author: 'mxinden'
4+
5+
inputs:
6+
name:
7+
description: 'Name of the QUIC implementation'
8+
required: true
9+
image:
10+
description: 'Docker image to be tested. Needs to reside either locally, or on some registry.'
11+
required: true
12+
url:
13+
description: 'URL of the QUIC implementation'
14+
required: true
15+
role:
16+
description: 'client/server/both'
17+
required: false
18+
default: 'both'
19+
client:
20+
description: 'client implementations (comma-separated)'
21+
required: false
22+
default: ''
23+
server:
24+
description: 'server implementations (comma-separated)'
25+
required: false
26+
default: ''
27+
test:
28+
description: 'test cases (comma-separatated)'
29+
required: false
30+
default: ''
31+
32+
runs:
33+
using: "composite"
34+
steps:
35+
- name: Install dependencies
36+
run: |
37+
sudo add-apt-repository ppa:wireshark-dev/stable
38+
sudo apt-get update
39+
sudo apt-get install -y wireshark tshark jq
40+
shell: bash
41+
42+
- uses: actions/setup-python@v4
43+
with:
44+
python-version: 3.8
45+
46+
- name: Enable IPv6 support
47+
run: sudo modprobe ip6table_filter
48+
shell: bash
49+
50+
- name: Checkout quic-interop/quic-interop-runner repository
51+
uses: actions/checkout@v2
52+
with:
53+
repository: 'quic-interop/quic-interop-runner'
54+
path: 'quic-interop-runner'
55+
56+
- name: Install Python packages
57+
run: |
58+
cd quic-interop-runner
59+
pip install -U pip
60+
pip install -r requirements.txt
61+
shell: bash
62+
63+
- run: docker image ls
64+
shell: bash
65+
66+
- name: Run tests
67+
id: test-run
68+
run: |
69+
cd quic-interop-runner
70+
jq --arg key "${{ inputs.name }}" --argjson newEntry '{"image": "${{ inputs.image }}", "url": "${{ inputs.url }}", "role": "${{ inputs.role }}"}' '.[$key] = $newEntry' implementations.json > temp.$$ && mv temp.$$ implementations.json
71+
cat implementations.json
72+
ARGS="--log-dir logs --must-include ${{ inputs.name }}"
73+
if [ -n "${{ inputs.client }}" ]; then
74+
ARGS="$ARGS --client ${{ inputs.client }}"
75+
fi
76+
if [ -n "${{ inputs.server }}" ]; then
77+
ARGS="$ARGS --server ${{ inputs.server }}"
78+
fi
79+
if [ -n "${{ inputs.test }}" ]; then
80+
ARGS="$ARGS --test ${{ inputs.test }}"
81+
fi
82+
python run.py $ARGS 2>&1 | tee summary
83+
shell: bash
84+
85+
- uses: actions/upload-artifact@v4
86+
id: artifact-upload-step
87+
if: always()
88+
with:
89+
name: logs
90+
path: quic-interop-runner/logs
91+
92+
# This action might be running off of a fork and would thus not have write
93+
# permissions on the origin repository. In order to allow a separate
94+
# priviledged action to post a comment on a pull request, upload the
95+
# necessary metadata.
96+
- name: store comment-data
97+
shell: bash
98+
if: github.event_name == 'pull_request'
99+
env:
100+
PULL_REQUEST_NUMBER: ${{ github.event.number }}
101+
run: |
102+
mkdir comment-data
103+
mv quic-interop-runner/summary comment-data/summary
104+
echo $PULL_REQUEST_NUMBER > comment-data/pr-number
105+
echo '${{ steps.artifact-upload-step.outputs.artifact-url }}' > comment-data/logs-url
106+
107+
- name: Upload comment data
108+
uses: actions/upload-artifact@v4
109+
if: github.event_name == 'pull_request'
110+
with:
111+
name: comment-data
112+
path: ./comment-data

.github/workflows/qns.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ jobs:
6262

6363
- name: Run QUIC Interop tests
6464
# TODO: Replace once https://github.com/quic-interop/quic-interop-runner/pull/356 is merged.
65-
uses: mxinden/quic-interop-runner@action
65+
uses: ./.github/actions/quic-interop-runner
6666
with:
6767
name: 'neqo-latest'
6868
image: ${{ steps.docker_build_and_push.outputs.imageID }}

0 commit comments

Comments
 (0)