2021-02-01 19:05:50 +03:00
|
|
|
name: test
|
2021-01-30 00:29:51 +03:00
|
|
|
|
|
|
|
on: [push, pull_request]
|
|
|
|
|
|
|
|
env:
|
|
|
|
CARGO_TERM_COLOR: always
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
rustfmt:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout repository
|
2022-05-17 11:04:49 +03:00
|
|
|
uses: actions/checkout@v3
|
2021-01-30 00:29:51 +03:00
|
|
|
- name: Install Rust
|
|
|
|
uses: actions-rs/toolchain@v1
|
|
|
|
with:
|
|
|
|
toolchain: stable
|
|
|
|
override: true
|
|
|
|
profile: minimal
|
|
|
|
components: rustfmt
|
|
|
|
- name: Check formatting
|
|
|
|
run: |
|
|
|
|
cargo fmt --all -- --check
|
|
|
|
|
|
|
|
clippy:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout repository
|
2022-05-17 11:04:49 +03:00
|
|
|
uses: actions/checkout@v3
|
2021-01-30 00:29:51 +03:00
|
|
|
- name: Install Rust
|
|
|
|
uses: actions-rs/toolchain@v1
|
|
|
|
with:
|
|
|
|
toolchain: stable
|
|
|
|
override: true
|
|
|
|
profile: minimal
|
|
|
|
components: clippy
|
|
|
|
- name: Run Clippy
|
|
|
|
run: |
|
|
|
|
cargo clippy -- -D warnings
|
|
|
|
|
2021-07-02 20:35:46 +03:00
|
|
|
dependency-age:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout repository
|
2022-05-17 11:04:49 +03:00
|
|
|
uses: actions/checkout@v3
|
2021-07-02 20:35:46 +03:00
|
|
|
- name: Run dependency_age
|
|
|
|
run: |
|
|
|
|
./ci/dependency_age.sh
|
|
|
|
|
2022-02-05 03:57:19 +03:00
|
|
|
checks:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout repository
|
2022-05-17 11:04:49 +03:00
|
|
|
uses: actions/checkout@v3
|
2022-02-05 03:57:19 +03:00
|
|
|
- name: Check Shell Scripts
|
|
|
|
run: |
|
|
|
|
find -name *.sh | xargs shellcheck
|
|
|
|
- name: Check Python Scripts
|
|
|
|
run: |
|
|
|
|
pip3 install black
|
2022-02-05 13:13:49 +03:00
|
|
|
black --check .
|
2022-02-05 03:57:19 +03:00
|
|
|
|
|
|
|
|
2021-11-25 12:25:00 +03:00
|
|
|
benchsuite:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout repository
|
2022-05-17 11:04:49 +03:00
|
|
|
uses: actions/checkout@v3
|
2022-03-10 12:04:59 +03:00
|
|
|
- name: Install
|
2021-11-25 12:25:00 +03:00
|
|
|
run: |
|
|
|
|
# Install libcurl dev so that hurl can be built dynamically with libcurl
|
|
|
|
sudo apt update
|
|
|
|
sudo apt install libcurl4-openssl-dev
|
2022-03-10 21:42:20 +03:00
|
|
|
ci/install_rust_latest.sh
|
|
|
|
- name: Build
|
|
|
|
run: |
|
2021-11-25 12:25:00 +03:00
|
|
|
ci/release.sh
|
|
|
|
- name: Test Prequisites
|
|
|
|
run: |
|
2022-04-01 12:31:12 +03:00
|
|
|
pip3 install --requirement integration/requirements-frozen.txt
|
2021-11-25 12:25:00 +03:00
|
|
|
cd bench
|
|
|
|
python3 server.py >server.log 2>&1 &
|
|
|
|
sleep 2
|
|
|
|
netstat -an | grep 8000
|
|
|
|
- name: Run Bench Suite
|
|
|
|
run: |
|
|
|
|
export PATH="$PWD/target/release:$PATH"
|
|
|
|
cd bench
|
|
|
|
./run.sh
|
|
|
|
- name: Archive artifacts
|
2022-05-17 11:04:53 +03:00
|
|
|
uses: actions/upload-artifact@v3
|
2021-11-25 12:25:00 +03:00
|
|
|
if: ${{ always() }}
|
|
|
|
with:
|
|
|
|
name: tests-bench-artifacts
|
|
|
|
path: |
|
|
|
|
bench/server.log
|
|
|
|
|
|
|
|
test-ubuntu-x64:
|
2021-01-30 00:29:51 +03:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
|
|
|
matrix:
|
2021-11-25 12:25:00 +03:00
|
|
|
rust: [stable]
|
2021-01-30 00:29:51 +03:00
|
|
|
steps:
|
|
|
|
- name: Checkout repository
|
2022-05-17 11:04:49 +03:00
|
|
|
uses: actions/checkout@v3
|
2022-03-10 12:04:59 +03:00
|
|
|
- name: Install
|
2021-02-01 23:57:36 +03:00
|
|
|
run: |
|
2022-03-10 21:42:20 +03:00
|
|
|
sudo apt update
|
2022-03-21 21:24:06 +03:00
|
|
|
sudo apt install libcurl4-openssl-dev libxml2-utils
|
2022-03-10 21:42:20 +03:00
|
|
|
python3 -m pip install --upgrade pip --quiet
|
2022-03-10 12:04:59 +03:00
|
|
|
ci/install_rust_latest.sh
|
2021-01-30 00:29:51 +03:00
|
|
|
- name: Build
|
|
|
|
run: |
|
2022-03-21 21:24:06 +03:00
|
|
|
cargo build --release --verbose --locked
|
|
|
|
target/release/hurl --version
|
|
|
|
curl --version
|
2021-01-30 00:29:51 +03:00
|
|
|
- name: Test Prequisites
|
|
|
|
run: |
|
2022-03-10 21:42:20 +03:00
|
|
|
ci/test_prerequisites.sh
|
2021-02-23 19:37:41 +03:00
|
|
|
- name: Run Tests units
|
2021-01-30 00:29:51 +03:00
|
|
|
run: |
|
2021-12-16 19:43:58 +03:00
|
|
|
cargo test --features strict
|
2021-01-30 00:29:51 +03:00
|
|
|
- name: Run Integration Tests
|
|
|
|
run: |
|
|
|
|
export PATH="$PWD/target/debug:$PATH"
|
2021-02-03 22:31:09 +03:00
|
|
|
cd integration
|
|
|
|
./integration.py
|
2022-02-14 18:37:57 +03:00
|
|
|
./test_curl_commands.sh $(find ./tests_ok -maxdepth 1 -type f -name '*.curl' ! -name '*windows*')
|
2022-02-14 11:13:33 +03:00
|
|
|
./test_html_output.py tests_ok/*.html
|
2022-02-14 18:37:57 +03:00
|
|
|
xmllint --noout tests_ok/*.html
|
|
|
|
./test_curl_commands.sh $(find ./tests_failed -maxdepth 1 -type f -name '*.curl' ! -name '*windows*')
|
2022-02-14 11:13:33 +03:00
|
|
|
./test_html_output.py tests_failed/*.html
|
2022-02-14 18:37:57 +03:00
|
|
|
xmllint --noout tests_failed/*.html
|
2021-11-08 13:39:56 +03:00
|
|
|
./report.sh
|
2021-02-03 22:31:09 +03:00
|
|
|
- name: Archive production artifacts
|
2022-05-17 11:04:53 +03:00
|
|
|
uses: actions/upload-artifact@v3
|
2021-02-03 22:31:09 +03:00
|
|
|
if: ${{ always() }}
|
|
|
|
with:
|
|
|
|
name: tests-ubuntu-${{ matrix.rust }}-artifacts
|
2021-02-06 14:15:32 +03:00
|
|
|
path: |
|
|
|
|
integration/server.log
|
|
|
|
integration/server-ssl.log
|
2021-11-08 13:39:56 +03:00
|
|
|
integration/report/tests.json
|
|
|
|
integration/report/tests.xml
|
2021-11-08 13:23:15 +03:00
|
|
|
|
2021-11-25 12:25:00 +03:00
|
|
|
test-docker-archlinux-x64:
|
2021-11-08 13:23:15 +03:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout repository
|
2022-05-17 11:04:49 +03:00
|
|
|
uses: actions/checkout@v3
|
2021-11-25 12:25:00 +03:00
|
|
|
- name: Build, Test units and Integration tests
|
2021-11-17 12:20:40 +03:00
|
|
|
uses: addnab/docker-run-action@v3
|
2021-11-08 13:23:15 +03:00
|
|
|
with:
|
|
|
|
image: archlinux
|
|
|
|
options: --volume ${{ github.workspace }}:/work --workdir /work --privileged --env CARGO_TERM_COLOR=always
|
|
|
|
run: |
|
|
|
|
set -eu
|
|
|
|
uname -a
|
|
|
|
uname -m
|
2022-03-10 21:42:20 +03:00
|
|
|
echo "----- install prerequisite packages -----"
|
2021-11-08 13:23:15 +03:00
|
|
|
pacman -Syy --noconfirm
|
2022-01-19 00:15:11 +03:00
|
|
|
pacman -Sy --noconfirm curl icu base-devel libxml2 python3
|
2021-11-29 22:52:47 +03:00
|
|
|
curl -O https://bootstrap.pypa.io/get-pip.py
|
|
|
|
python3 get-pip.py
|
2022-03-10 21:42:20 +03:00
|
|
|
ci/install_rust_latest.sh
|
|
|
|
ci/build_and_test.sh
|
2021-11-08 13:23:15 +03:00
|
|
|
- name: Archive production artifacts
|
2022-05-17 11:04:53 +03:00
|
|
|
uses: actions/upload-artifact@v3
|
2021-11-08 13:23:15 +03:00
|
|
|
if: ${{ always() }}
|
|
|
|
with:
|
|
|
|
name: tests-archlinux-x64-artifacts
|
|
|
|
path: |
|
|
|
|
integration/mitmdump.log
|
|
|
|
integration/server.log
|
|
|
|
integration/server-ssl.log
|
|
|
|
|
2021-11-25 12:25:00 +03:00
|
|
|
test-docker-fedora-x64:
|
2021-11-17 12:20:40 +03:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout repository
|
2022-05-17 11:04:49 +03:00
|
|
|
uses: actions/checkout@v3
|
2021-11-25 12:25:00 +03:00
|
|
|
- name: Build, Test units and Integration tests
|
2021-11-17 12:20:40 +03:00
|
|
|
uses: addnab/docker-run-action@v3
|
|
|
|
with:
|
|
|
|
image: fedora
|
|
|
|
options: --volume ${{ github.workspace }}:/work --workdir /work --privileged --env CARGO_TERM_COLOR=always
|
|
|
|
run: |
|
|
|
|
set -eu
|
|
|
|
uname -a
|
|
|
|
uname -m
|
2022-03-10 21:42:20 +03:00
|
|
|
echo "----- install prerequisite packages -----"
|
2022-01-19 00:15:11 +03:00
|
|
|
yum install -y procps gcc libxml2-devel openssl-devel libcurl-devel python3-devel python3-pip
|
2021-11-17 12:20:40 +03:00
|
|
|
python3 -m pip install --upgrade pip --quiet
|
2022-03-10 21:42:20 +03:00
|
|
|
ci/install_rust_latest.sh
|
|
|
|
ci/build_and_test.sh
|
2021-11-17 12:20:40 +03:00
|
|
|
- name: Archive production artifacts
|
2022-05-17 11:04:53 +03:00
|
|
|
uses: actions/upload-artifact@v3
|
2021-11-17 12:20:40 +03:00
|
|
|
if: ${{ always() }}
|
|
|
|
with:
|
|
|
|
name: tests-fedora-x64-artifacts
|
|
|
|
path: |
|
|
|
|
integration/mitmdump.log
|
|
|
|
integration/server.log
|
|
|
|
integration/server-ssl.log
|
|
|
|
|
2021-11-29 15:58:18 +03:00
|
|
|
test-docker-alpine-x64:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout repository
|
2022-05-17 11:04:49 +03:00
|
|
|
uses: actions/checkout@v3
|
2021-11-29 15:58:18 +03:00
|
|
|
- name: Build, Test units and Integration tests
|
|
|
|
uses: addnab/docker-run-action@v3
|
|
|
|
with:
|
|
|
|
image: alpine
|
2022-01-20 13:47:13 +03:00
|
|
|
options: --volume ${{ github.workspace }}:/work --workdir /work --privileged --env CARGO_TERM_COLOR=always --env RUSTFLAGS=-Ctarget-feature=-crt-static
|
2021-11-29 15:58:18 +03:00
|
|
|
run: |
|
|
|
|
set -eu
|
|
|
|
uname -a
|
|
|
|
uname -m
|
2022-03-10 21:42:20 +03:00
|
|
|
echo "----- install prerequisite packages -----"
|
2021-11-29 15:58:18 +03:00
|
|
|
apk update --quiet
|
2022-03-22 12:05:01 +03:00
|
|
|
apk add --quiet bash curl curl-dev build-base libffi-dev libxml2-dev libxml2-utils openssl-dev python3 python3-dev py3-pip
|
2021-11-29 15:58:18 +03:00
|
|
|
python3 -m pip install --upgrade pip --quiet
|
2022-03-10 21:42:20 +03:00
|
|
|
ci/install_rust_latest.sh
|
|
|
|
ci/build_and_test.sh
|
2021-11-29 15:58:18 +03:00
|
|
|
- name: Archive production artifacts
|
2022-05-17 11:04:53 +03:00
|
|
|
uses: actions/upload-artifact@v3
|
2021-11-29 15:58:18 +03:00
|
|
|
if: ${{ always() }}
|
|
|
|
with:
|
|
|
|
name: tests-alpine-x64-artifacts
|
|
|
|
path: |
|
|
|
|
integration/mitmdump.log
|
|
|
|
integration/server.log
|
|
|
|
integration/server-ssl.log
|
|
|
|
|
2022-04-29 18:27:17 +03:00
|
|
|
test-macos-x64:
|
2021-01-30 00:29:51 +03:00
|
|
|
runs-on: macos-latest
|
|
|
|
strategy:
|
|
|
|
matrix:
|
2021-11-25 12:25:00 +03:00
|
|
|
rust: [stable]
|
2021-01-30 00:29:51 +03:00
|
|
|
steps:
|
|
|
|
- name: Checkout repository
|
2022-05-17 11:04:49 +03:00
|
|
|
uses: actions/checkout@v3
|
2021-01-30 00:29:51 +03:00
|
|
|
- name: Install Rust
|
|
|
|
uses: actions-rs/toolchain@v1
|
|
|
|
with:
|
|
|
|
toolchain: ${{ matrix.rust }}
|
|
|
|
override: true
|
|
|
|
profile: minimal
|
2021-02-01 23:49:34 +03:00
|
|
|
- name: Environment
|
2021-02-01 23:57:36 +03:00
|
|
|
run: |
|
2021-02-01 23:49:34 +03:00
|
|
|
uname -a
|
|
|
|
cargo --version
|
2021-01-30 00:29:51 +03:00
|
|
|
- name: Build
|
|
|
|
run: |
|
2022-03-21 21:24:06 +03:00
|
|
|
cargo build --release --verbose --locked
|
|
|
|
target/release/hurl --version
|
|
|
|
curl --version
|
2021-01-30 00:29:51 +03:00
|
|
|
- name: Test Prequisites
|
|
|
|
run: |
|
2022-04-01 12:31:12 +03:00
|
|
|
pip3 install --requirement integration/requirements-frozen.txt
|
2021-02-06 14:15:32 +03:00
|
|
|
cd integration
|
|
|
|
python3 server.py >server.log 2>&1 &
|
|
|
|
python3 ssl/server.py >server-ssl.log 2>&1 &
|
2022-04-01 12:31:12 +03:00
|
|
|
mitmdump -p 8888 --modify-header "/From-Proxy/Hello" &
|
2021-02-23 19:37:41 +03:00
|
|
|
- name: Run Tests units
|
2021-01-30 00:29:51 +03:00
|
|
|
run: |
|
2021-12-16 19:43:58 +03:00
|
|
|
cargo test
|
2021-01-30 00:29:51 +03:00
|
|
|
- name: Run Integration Tests
|
|
|
|
run: |
|
|
|
|
export PATH="$PWD/target/debug:$PATH"
|
2021-02-03 22:31:09 +03:00
|
|
|
cd integration
|
|
|
|
./integration.py
|
|
|
|
- name: Archive production artifacts
|
2022-05-17 11:04:53 +03:00
|
|
|
uses: actions/upload-artifact@v3
|
2021-02-03 22:31:09 +03:00
|
|
|
if: ${{ always() }}
|
|
|
|
with:
|
2022-04-29 18:27:17 +03:00
|
|
|
name: tests-macos-${{ matrix.rust }}-artifacts
|
2021-02-06 14:15:32 +03:00
|
|
|
path: |
|
|
|
|
integration/server.log
|
|
|
|
integration/server-ssl.log
|
2021-02-23 19:37:41 +03:00
|
|
|
|
2022-05-11 11:15:37 +03:00
|
|
|
test-emulated-raspios-arm-x64:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2022-05-17 11:04:49 +03:00
|
|
|
- uses: actions/checkout@v3
|
2022-05-11 11:15:37 +03:00
|
|
|
- uses: actions/cache@v3
|
|
|
|
with:
|
|
|
|
path: |
|
|
|
|
target
|
|
|
|
venv
|
|
|
|
root
|
2022-05-20 15:26:13 +03:00
|
|
|
key: ${{ runner.os }}-test-emulated-raspios-arm-x64-${{ github.sha }}
|
|
|
|
restore-keys: ${{ runner.os }}-test-emulated-raspios-arm-x64-
|
2022-05-11 11:15:37 +03:00
|
|
|
- uses: pguyot/arm-runner-action@v2
|
|
|
|
with:
|
|
|
|
cpu: cortex-a53
|
|
|
|
cpu_info: cpuinfo/raspberrypi_4b
|
|
|
|
image_additional_mb: 8192
|
|
|
|
copy_artifact_path: target;venv;root
|
|
|
|
base_image: raspios_lite_arm64:latest
|
|
|
|
commands: |
|
|
|
|
set -eu
|
|
|
|
uname -a ; uname -m ; lsb_release -a
|
|
|
|
# read cache
|
2022-05-20 15:26:13 +03:00
|
|
|
for dir in /hurl/target /hurl/venv /hurl/root ; do [ -d "${dir}" ] && chown root:root "${dir}" && chmod -R 777 "${dir}" ; done
|
|
|
|
for dir in .rustup .cargo ; do [ -d "/hurl/root/${dir}" ] && cp -fr "/hurl/root/${dir}" "/root/${dir}" && rm -fr "/hurl/root/${dir}" ; done
|
2022-05-11 11:15:37 +03:00
|
|
|
echo "# init fastest build"
|
|
|
|
mkdir -p /hurl/.cargo
|
|
|
|
echo '[target.aarch64-unknown-linux-gnu]' > /hurl/.cargo/config.toml
|
2022-05-20 15:26:13 +03:00
|
|
|
echo 'linker = "clang"' >> /hurl/.cargo/config.toml
|
2022-05-11 11:15:37 +03:00
|
|
|
echo 'rustflags = ["-Clink-arg=-fuse-ld=lld"]' >> /hurl/.cargo/config.toml
|
|
|
|
echo "# Install build prerequistes"
|
|
|
|
apt -qq --silent update
|
|
|
|
apt -qq --silent install -y clang lld build-essential pkg-config libssl-dev libcurl4-openssl-dev libxml2-dev libxml2-utils python3 python3-pip python3-venv
|
|
|
|
[ ! -d "/hurl/venv" ] && python3 -m venv /hurl/venv
|
2022-05-20 15:26:13 +03:00
|
|
|
. /hurl/venv/bin/activate
|
2022-05-11 11:15:37 +03:00
|
|
|
python3 -m pip install pip --upgrade
|
|
|
|
./ci/install_rust_latest.sh
|
2022-05-20 15:26:13 +03:00
|
|
|
echo "# Execute tests"
|
2022-05-11 11:15:37 +03:00
|
|
|
./ci/build_and_test.sh
|
|
|
|
echo "# pre-write cache"
|
2022-05-20 15:26:13 +03:00
|
|
|
mkdir -p /hurl/root
|
|
|
|
for dir in .rustup .cargo ; do [ -d "/root/${dir}" ] && cp -fr "/root/${dir}" "/hurl/root/${dir}" ; done
|
|
|
|
for dir in /hurl/target /hurl/venv /hurl/root ; do [ -d "${dir}" ] && chown root:root "${dir}" && chmod -R 777 "${dir}" ; done
|
2022-05-11 11:15:37 +03:00
|
|
|
|
2021-11-25 12:25:00 +03:00
|
|
|
test-windows-x64:
|
2021-02-23 19:37:41 +03:00
|
|
|
runs-on: windows-latest
|
|
|
|
strategy:
|
|
|
|
matrix:
|
2021-11-25 12:25:00 +03:00
|
|
|
rust: [stable]
|
2021-02-23 19:37:41 +03:00
|
|
|
env:
|
|
|
|
VCPKGRS_DYNAMIC: 1
|
|
|
|
steps:
|
|
|
|
- name: Set git to use LF
|
|
|
|
run: |
|
|
|
|
git config --global core.autocrlf false
|
|
|
|
git config --global core.eol lf
|
|
|
|
- name: Checkout repository
|
2022-05-19 17:11:07 +03:00
|
|
|
uses: actions/checkout@v3
|
|
|
|
- uses: actions/cache@v3
|
|
|
|
with:
|
|
|
|
path: |
|
|
|
|
C:\vcpkg\installed
|
2022-05-21 20:40:41 +03:00
|
|
|
key: ${{ runner.os }}-test-windows-x64-${{ github.sha }}
|
|
|
|
restore-keys: ${{ runner.os }}-test-windows-x64-
|
2021-02-23 19:37:41 +03:00
|
|
|
- name: Install Rust
|
|
|
|
uses: actions-rs/toolchain@v1
|
|
|
|
with:
|
|
|
|
toolchain: stable
|
|
|
|
override: true
|
|
|
|
profile: minimal
|
|
|
|
- name: Environment
|
|
|
|
run: |
|
|
|
|
$Properties = 'Caption', 'CSName', 'Version', 'BuildType', 'OSArchitecture'
|
|
|
|
Get-CimInstance Win32_OperatingSystem | Select-Object $Properties | Format-Table -AutoSize
|
|
|
|
cargo --version
|
|
|
|
$PsVersionTable
|
|
|
|
- name: Install build and tests prequisites
|
|
|
|
run: |
|
|
|
|
# vcpkg build prequisites
|
|
|
|
(Get-Command vcpkg).Path
|
2022-05-19 17:11:07 +03:00
|
|
|
if (Test-Path C:\vcpkg\installed) {vcpkg update} else {vcpkg install libxml2:x64-windows}
|
2021-02-23 19:37:41 +03:00
|
|
|
vcpkg integrate install
|
|
|
|
# install proxy and server
|
2022-04-01 12:31:12 +03:00
|
|
|
pip3 install --requirement integration/requirements-frozen.txt
|
2021-02-23 19:37:41 +03:00
|
|
|
- name: Run Tests units
|
|
|
|
run: |
|
|
|
|
cd .\integration
|
|
|
|
Start-Job -Name mitmdump -ScriptBlock { mitmdump --listen-port 8888 --modify-header "/From-Proxy/Hello" }
|
|
|
|
Start-Job -Name server -ScriptBlock { python server.py > server.log }
|
|
|
|
Start-Job -Name server -ScriptBlock { python ssl/server.py > server-ssl.log }
|
|
|
|
Get-Job -Name server
|
|
|
|
Get-Job -Name mitmdump
|
|
|
|
Start-Sleep 5
|
|
|
|
cd ..
|
2022-01-28 12:53:13 +03:00
|
|
|
cargo test --features strict --tests
|
2021-02-23 19:37:41 +03:00
|
|
|
- name: Run Integration tests
|
|
|
|
run: |
|
2022-03-21 21:24:06 +03:00
|
|
|
cargo build --release --verbose --locked
|
|
|
|
target\release\hurl.exe --version
|
2021-02-23 19:37:41 +03:00
|
|
|
$execdir=[System.Environment]::SystemDirectory
|
|
|
|
Get-ChildItem -Path ".\target\release" -Recurse -Include *.dll -File | Copy-Item -Destination "${execdir}"
|
|
|
|
Get-ChildItem -Path ".\target\release" -Recurse -Include hurl*.exe -File | Copy-Item -Destination "${execdir}"
|
|
|
|
cd .\integration
|
|
|
|
Start-Job -Name mitmdump -ScriptBlock { mitmdump --listen-port 8888 --modify-header "/From-Proxy/Hello" }
|
|
|
|
Start-Job -Name server -ScriptBlock { python server.py > server.log }
|
|
|
|
Start-Job -Name server -ScriptBlock { python ssl/server.py > server-ssl.log }
|
|
|
|
Get-Job -Name server
|
|
|
|
Get-Job -Name mitmdump
|
|
|
|
Start-Sleep 5
|
|
|
|
hurlfmt --no-format tests\assert_base64.hurl
|
|
|
|
python integration.py
|
|
|
|
- name: Archive production artifacts
|
2022-05-17 11:04:53 +03:00
|
|
|
uses: actions/upload-artifact@v3
|
2021-02-23 19:37:41 +03:00
|
|
|
if: ${{ always() }}
|
|
|
|
with:
|
|
|
|
name: tests-win64-${{ matrix.rust }}-artifacts
|
|
|
|
path: |
|
|
|
|
integration/server.log
|
2022-05-20 15:26:13 +03:00
|
|
|
integration/server-ssl.log
|