Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(.github): run QUIC Interop Runner #1682

Merged
merged 19 commits into from
Mar 6, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 56 additions & 0 deletions .github/workflows/qns-comment.yml
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A comment with the test results on each pull requests will only appear once this workflow is in main.

Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# Post test results as pull request comment.
#
# This is done as a separate workflow as it requires write permissions. The
# tests itself might run off of a fork, i.e. an untrusted environment and should
# thus not be granted write permissions.

name: Comment on the pull request

on:
workflow_run:
workflows: ["QUIC Network Simulator"]
types:
- completed

jobs:
upload:
permissions:
pull-requests: write
runs-on: ubuntu-latest
if: >
github.event.workflow_run.event == 'pull_request'
steps:
- name: Download comment-data
uses: dawidd6/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
workflow: main.yml
run_id: ${{ github.event.workflow_run.id }}
name: comment-data

- name: Format GitHub comment
run: |
pwd
ls -la
echo '[**QUIC Interop Runner**](https://github.com/quic-interop/quic-interop-runner)' >> comment
echo '' >> comment
echo '```' >> comment
cat summary >> comment
echo '```' >> comment
echo '' >> comment
echo 'Download artifacts [here](' >> comment
cat logs-url >> comment
echo ').' >> comment
if: always()
shell: bash

- name: Read PR Number
id: pr-number
run: echo "::set-output name=number::$(cat pr-number)"
shell: bash

- name: Comment PR
uses: thollander/actions-comment-pull-request@v2
with:
filePath: comment
pr_number: ${{ steps.pr-number.outputs.number }}
15 changes: 11 additions & 4 deletions .github/workflows/qns.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,9 @@ on:
- '.github/workflows/qns.yml'
merge_group:
branches: ["main"]
paths:
- 'qns/**'
- '.github/workflows/qns.yml'

jobs:
docker-image:
quic-network-simulator:
runs-on: ubuntu-latest
permissions:
packages: write
Expand Down Expand Up @@ -48,6 +46,7 @@ jobs:
type=raw,value=latest,enable={{is_default_branch}}

- name: Build and push
id: docker_build_and_push
uses: docker/build-push-action@v5
with:
push: ${{ github.event_name != 'pull_request' }}
Expand All @@ -58,3 +57,11 @@ jobs:
cache-from: type=gha
cache-to: type=gha,mode=max
platforms: linux/amd64, linux/arm64

- name: Run QUIC Interop tests
# TODO: Replace once https://github.com/quic-interop/quic-interop-runner/pull/356 is merged.
uses: mxinden/quic-interop-runner@action
with:
name: 'neqo-latest'
image: ${{ steps.docker_build_and_push.outputs.imageID }}
url: https://github.com/mozilla/neqo