fix permissions #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: integration test | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
integration-test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: preparatino | |
run: | | |
echo "build the program" | |
cargo build && cp ./target/debug/tunl-relay . | |
echo "prepare config" | |
sed -i -e '/whitelist = \[/a\' -e ' "127.0.0.1",' config.toml | |
sed -i -e '/whitelist = \[/a\' -e ' "216.239.38.120",' config.toml | |
- name: test v1 header | |
run: | | |
./tunl-relay --config config.toml & | |
PID=$! | |
echo "tunl-relay started with PID $PID" | |
sleep 2 | |
python3 ./tests/integration.py Test.test_v1 | |
kill $PID | |
echo "tunl-relay stopped with PID $PID" | |
- name: test v2 header | |
run: | | |
echo "change config protocol version to v2" | |
sed -i -e 's/"v1"/"v2"/' config.toml | |
./tunl-relay --config config.toml & | |
PID=$! | |
echo "tunl-relay started with PID $PID" | |
sleep 2 | |
python3 ./tests/integration.py Test.test_v2 | |
kill $PID | |
echo "tunl-relay stopped with PID $PID" |