2021-11-04 22:45:20 +03:00
|
|
|
version: 2.1
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
test-ubuntu-arm64:
|
|
|
|
machine:
|
2022-04-11 11:18:03 +03:00
|
|
|
image: ubuntu-2004:current
|
2021-11-04 22:45:20 +03:00
|
|
|
resource_class: arm.medium
|
|
|
|
steps:
|
|
|
|
- checkout
|
|
|
|
- run:
|
2021-11-05 18:44:56 +03:00
|
|
|
name: Build
|
2021-11-04 22:45:20 +03:00
|
|
|
command: |
|
2022-03-22 16:02:46 +03:00
|
|
|
export CARGO_NET_GIT_FETCH_WITH_CLI=true
|
2021-11-04 22:45:20 +03:00
|
|
|
uname -a
|
|
|
|
lsb_release -a
|
|
|
|
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
|
|
|
|
source $HOME/.cargo/env
|
|
|
|
rustc --version
|
|
|
|
cargo --version
|
2022-03-22 16:02:46 +03:00
|
|
|
sudo apt update -qq
|
|
|
|
sudo apt install -y -qq libxml2-utils libcurl4-openssl-dev
|
|
|
|
cargo build --release --verbose --locked --color always
|
|
|
|
target/release/hurl --version
|
|
|
|
curl --version
|
2021-11-04 22:45:20 +03:00
|
|
|
- run:
|
2021-11-05 18:44:56 +03:00
|
|
|
name: Tests units and integration tests
|
2021-11-04 22:45:20 +03:00
|
|
|
command: |
|
2021-11-05 18:44:56 +03:00
|
|
|
python3 -m pip install --upgrade pip --quiet
|
2022-12-11 13:57:19 +03:00
|
|
|
bin/test/test_prerequisites.sh
|
2021-11-05 18:44:56 +03:00
|
|
|
echo "================= Tests units ================="
|
2021-11-04 22:45:20 +03:00
|
|
|
cargo test --features strict --verbose --color always
|
2021-11-05 18:44:56 +03:00
|
|
|
mitmdump --version
|
2022-04-01 12:31:12 +03:00
|
|
|
pip3 install lxml bs4
|
2022-12-11 13:57:19 +03:00
|
|
|
echo "================= Integration tests ================="
|
|
|
|
export PATH="$PWD/target/debug:$PATH"
|
|
|
|
cd integration
|
2021-11-04 22:45:20 +03:00
|
|
|
python3 ./integration.py
|
2022-02-14 11:13:33 +03:00
|
|
|
./test_curl_commands.sh $(find ./tests_ok -maxdepth 1 -type f -name '*.curl' ! -name '*windows*')
|
|
|
|
python3 ./test_html_output.py tests_ok/*.html
|
|
|
|
xmllint --noout tests_ok/*.html
|
|
|
|
./test_curl_commands.sh $(find ./tests_failed -maxdepth 1 -type f -name '*.curl' ! -name '*windows*')
|
|
|
|
python3 ./test_html_output.py tests_failed/*.html
|
|
|
|
xmllint --noout tests_failed/*.html
|
2021-11-04 22:45:20 +03:00
|
|
|
- store_artifacts:
|
|
|
|
path: integration/mitmdump.log
|
|
|
|
|
|
|
|
- store_artifacts:
|
|
|
|
path: integration/server.log
|
|
|
|
|
|
|
|
- store_artifacts:
|
|
|
|
path: integration/server-ssl.log
|
|
|
|
|
|
|
|
workflows:
|
2021-11-05 18:47:38 +03:00
|
|
|
tests-arm64:
|
2021-11-04 22:45:20 +03:00
|
|
|
jobs:
|
|
|
|
- test-ubuntu-arm64
|