forked from mozilla/neqo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
For now until quic-interop/quic-interop-runner#356 is merged.
- Loading branch information
Showing
2 changed files
with
113 additions
and
1 deletion.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,112 @@ | ||
name: 'QUIC Interop Runner Action' | ||
description: 'Run the QUIC Interop Runner tests.' | ||
author: 'mxinden' | ||
|
||
inputs: | ||
name: | ||
description: 'Name of the QUIC implementation' | ||
required: true | ||
image: | ||
description: 'Docker image to be tested. Needs to reside either locally, or on some registry.' | ||
required: true | ||
url: | ||
description: 'URL of the QUIC implementation' | ||
required: true | ||
role: | ||
description: 'client/server/both' | ||
required: false | ||
default: 'both' | ||
client: | ||
description: 'client implementations (comma-separated)' | ||
required: false | ||
default: '' | ||
server: | ||
description: 'server implementations (comma-separated)' | ||
required: false | ||
default: '' | ||
test: | ||
description: 'test cases (comma-separatated)' | ||
required: false | ||
default: '' | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Install dependencies | ||
run: | | ||
sudo add-apt-repository ppa:wireshark-dev/stable | ||
sudo apt-get update | ||
sudo apt-get install -y wireshark tshark jq | ||
shell: bash | ||
|
||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: 3.8 | ||
|
||
- name: Enable IPv6 support | ||
run: sudo modprobe ip6table_filter | ||
shell: bash | ||
|
||
- name: Checkout quic-interop/quic-interop-runner repository | ||
uses: actions/checkout@v2 | ||
with: | ||
repository: 'quic-interop/quic-interop-runner' | ||
path: 'quic-interop-runner' | ||
|
||
- name: Install Python packages | ||
run: | | ||
cd quic-interop-runner | ||
pip install -U pip | ||
pip install -r requirements.txt | ||
shell: bash | ||
|
||
- run: docker image ls | ||
shell: bash | ||
|
||
- name: Run tests | ||
id: test-run | ||
run: | | ||
cd quic-interop-runner | ||
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 | ||
cat implementations.json | ||
ARGS="--log-dir logs --must-include ${{ inputs.name }}" | ||
if [ -n "${{ inputs.client }}" ]; then | ||
ARGS="$ARGS --client ${{ inputs.client }}" | ||
fi | ||
if [ -n "${{ inputs.server }}" ]; then | ||
ARGS="$ARGS --server ${{ inputs.server }}" | ||
fi | ||
if [ -n "${{ inputs.test }}" ]; then | ||
ARGS="$ARGS --test ${{ inputs.test }}" | ||
fi | ||
python run.py $ARGS 2>&1 | tee summary | ||
shell: bash | ||
|
||
- uses: actions/upload-artifact@v4 | ||
id: artifact-upload-step | ||
if: always() | ||
with: | ||
name: logs | ||
path: quic-interop-runner/logs | ||
|
||
# This action might be running off of a fork and would thus not have write | ||
# permissions on the origin repository. In order to allow a separate | ||
# priviledged action to post a comment on a pull request, upload the | ||
# necessary metadata. | ||
- name: store comment-data | ||
shell: bash | ||
if: github.event_name == 'pull_request' | ||
env: | ||
PULL_REQUEST_NUMBER: ${{ github.event.number }} | ||
run: | | ||
mkdir comment-data | ||
mv quic-interop-runner/summary comment-data/summary | ||
echo $PULL_REQUEST_NUMBER > comment-data/pr-number | ||
echo '${{ steps.artifact-upload-step.outputs.artifact-url }}' > comment-data/logs-url | ||
- name: Upload comment data | ||
uses: actions/upload-artifact@v4 | ||
if: github.event_name == 'pull_request' | ||
with: | ||
name: comment-data | ||
path: ./comment-data |
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