feat: support proxying existing cgroup slices #513
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
on: [push, pull_request] | |
name: check and test | |
jobs: | |
cargo-check: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: stable | |
override: true | |
- uses: actions-rs/cargo@v1 | |
with: | |
command: check | |
cargo-test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: stable | |
override: true | |
- uses: actions-rs/cargo@v1 | |
with: | |
command: test | |
e2e-test: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
shell: bash -l {0} | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v3 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: stable | |
override: true | |
- name: Install Dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y iptables iproute2 socat curl dnsutils cgroup-tools | |
- name: Build cproxy | |
run: | | |
cargo build --release | |
- name: Prepare Test Environment | |
run: | | |
mkdir -p test/logs | |
chmod +x test/*.sh | |
sudo install -m 755 target/release/cproxy /usr/local/bin | |
- name: Run Redirect Mode Tests | |
run: | | |
sudo ./test/run_all_tests.sh |