Save output text and post it as comment #3
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
name: Tests | |
on: [workflow_call] | |
permissions: {} | |
jobs: | |
tests: | |
strategy: | |
matrix: | |
include: | |
- os: ubuntu-24.04 | |
packages: "" | |
- os: macos-14 | |
packages: "" | |
- os: windows-2022 | |
packages: -p neptun | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6 | |
- uses: actions-rs/toolchain@b2417cde72dcf67f306c0ae8e0828a81bf0b189f # v1.0.6 | |
- name: Install hack | |
run: cargo +stable install --git https://github.com/taiki-e/cargo-hack.git cargo-hack --rev c0b517b9eefa27cdaf27cca5f1b186c00ef1af47 --locked | |
- run: cargo hack test --each-feature ${{ matrix.packages }} | |
integration-tests: | |
strategy: | |
matrix: | |
os: [ ubuntu-24.04, macos-14 ] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6 | |
- uses: actions-rs/toolchain@b2417cde72dcf67f306c0ae8e0828a81bf0b189f # v1.0.6 | |
- run: CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_RUNNER='sudo -E' cargo test -- --ignored | |
crypto-bench: | |
strategy: | |
matrix: | |
os: [ ubuntu-24.04, macos-14, windows-2022 ] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6 | |
- uses: actions-rs/toolchain@b2417cde72dcf67f306c0ae8e0828a81bf0b189f # v1.0.6 | |
- run: cargo bench -p neptun --no-run | |
performance-tests: | |
runs-on: ubuntu-24.04 | |
steps: | |
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6 | |
with: | |
fetch-depth: 0 | |
- run: docker build -t neptun-runner:0.0.1 . | |
- run: cargo xtask perf --base main | |
xray-tests: | |
runs-on: ubuntu-24.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 | |
- name: Install wg | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y wireguard | |
- name: Setup pipenv | |
working-directory: xray | |
run: | | |
python -m pip install --upgrade pip | |
pip install pipenv | |
pipenv install | |
- name: Execute xray | |
working-directory: xray | |
run: pipenv run python run.py --wg native --ascii --save-output | |
- name: Upload results | |
uses: actions/upload-artifact@v4 | |
with: | |
name: xray-results | |
path: xray/results/*.png | |
- name: Post results | |
- uses: mshick/add-pr-comment@v2 | |
with: | |
message: | | |
**Hello** | |
🌏 | |
! |