-
-
Notifications
You must be signed in to change notification settings - Fork 101
feat: add github action #356
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
Open
mxinden
wants to merge
28
commits into
quic-interop:master
Choose a base branch
from
mxinden:action
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 4 commits
Commits
Show all changes
28 commits
Select commit
Hold shift + click to select a range
bc9feca
feat: add github action
mxinden 9f7a74d
Add pull_request_target
mxinden 58e4d9a
Revert "Add pull_request_target"
mxinden 03da3ad
Split into unpriviledged and priviledged workflow
mxinden ba32ba4
Trigger CI
mxinden 6818368
Use --must-include
mxinden 58d614c
Merge branch 'master' of https://github.com/quic-interop/quic-interop…
mxinden 934d374
reference latest
mxinden 69fcd42
Remove wrapping object
mxinden aa3a746
Add client, server and test argument option
mxinden 0f10426
debug args
mxinden 3a75b8f
Include itself
mxinden 96e38f8
Revert "debug args"
mxinden bb61dc3
Update
mxinden af5942e
rename workflows
mxinden 163cca4
restrict client and server set
mxinden 336dd78
rename job
mxinden 4828b85
Revert "restrict client and server set"
mxinden e3c6e4c
Only comment on failure
mxinden ee0c7ed
Update comment in-place
mxinden dfa7391
Merge branch 'master' of https://github.com/quic-interop/quic-interop…
mxinden 9277333
Remove debugging docker image ls
mxinden 5682ad0
Enable python pip caching
mxinden 6b1760e
Re-introduce checkout
mxinden b7be2ce
Use --markdown
mxinden b98691e
Don't access uninitialized field
mxinden 7635261
Use bugfix
mxinden 64ad7ad
Merge branch 'master' of https://github.com/quic-interop/quic-interop…
mxinden File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,21 @@ | ||
| name: quic-interop-runner | ||
|
|
||
| on: | ||
| pull_request: | ||
| workflow_dispatch: | ||
|
|
||
| jobs: | ||
| main: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| # Build your Docker image. | ||
|
|
||
| - name: Run QUIC Interop tests | ||
| uses: ./ | ||
| with: | ||
| name: 'neqo' | ||
| # Replace with the name of the freshly-build local docker image. | ||
| image: 'ghcr.io/mozilla/neqo-qns:latest' | ||
| url: https://github.com/mozilla/neqo | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This workflow will only execute once it is merged into master. In other words, once it is merged, a comment will appear on all future pull requests. |
This file contains hidden or 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,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-interop-runner"] | ||
| 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/action-download-artifact@v2.11.0 | ||
| 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 }} |
This file contains hidden or 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,89 @@ | ||
| 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' | ||
|
|
||
| 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 | ||
| 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 | ||
| echo '{"neqo": {"image": "${{ inputs.image }}", "url": "${{ inputs.name }}", "role": "${{ inputs.role }}"}}' > implementations.json | ||
mxinden marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| python run.py --test handshake --log-dir logs 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@v2 | ||
| if: github.event_name == 'pull_request' | ||
| with: | ||
| name: comment-data | ||
| path: ./comment-data | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.