Run test integ on deb package

This commit is contained in:
lepapareil 2022-10-04 15:31:38 +02:00
parent ecbab75b5d
commit df705c8670
No known key found for this signature in database
GPG Key ID: F4F06B068FB00692
11 changed files with 162 additions and 80 deletions

View File

@ -16,14 +16,17 @@ jobs:
bin/install_prerequisites_ubuntu.sh
bin/install_rust_latest.sh
- name: set Version
run: bin/release/version.sh
run: |
VERSION=$(bin/release/version.sh)
echo "VERSION=${VERSION}" >> "${GITHUB_ENV}"
- name: Build
run: |
bin/release/man.sh
bin/release/release.sh
echo "PATH=:${PWD}/target/release:$PATH" >> "${GITHUB_ENV}"
- name: Create generic linux package
run: bin/release/create_tarball.sh linux
- name: Archive production artifacts (tarball)
- name: Archive production artifacts
uses: actions/upload-artifact@v3
with:
name: release-generic-linux-x64-artifacts
@ -34,19 +37,46 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install Python 3.8
uses: actions/setup-python@v4
with:
python-version: '3.8'
- name: Install Curl 7.68
uses: myci-actions/add-deb-repo@10
with:
repo: deb http://azure.archive.ubuntu.com/ubuntu/ focal main restricted
repo-name: focal
install: curl
- name: Install
run: |
bin/install_prerequisites_ubuntu.sh
bin/install_rust_latest.sh
- name: set Version
run: bin/release/version.sh
- name: Environment
run: bin/environment.sh
- name: Set Version
run: |
VERSION=$(bin/release/version.sh)
echo "VERSION=${VERSION}" >> "${GITHUB_ENV}"
- name: Build
run: |
bin/release/man.sh
bin/release/release.sh
echo "PATH=:${PWD}/target/release:$PATH" >> "${GITHUB_ENV}"
- name: Test integ
run: |
bin/test/test_prerequisites.sh
bin/test/test_integ.sh
- name: Create deb package
run: bin/release/deb.sh
- name: Archive production artifacts (tarball)
run: bin/release/create_deb_package.sh
- name: Install package
run: |
bin/release/install_deb_package.sh
echo "PATH=/tmp/hurl-deb-package/usr/bin:$PATH" >> "${GITHUB_ENV}"
- name: Test integ
run: |
bin/test/test_prerequisites.sh
bin/test/test_integ.sh
- name: Archive production artifacts
uses: actions/upload-artifact@v3
with:
name: release-deb-x64-artifacts
@ -59,8 +89,10 @@ jobs:
uses: actions/checkout@v3
- name: Install Rust
run: bin/install_rust_latest.sh
- name: set Version
run: bin/release/version.sh
- name: Set Version
run: |
VERSION=$(bin/release/version.sh)
echo "VERSION=${VERSION}" >> "${GITHUB_ENV}"
- name: Build
run: |
bin/release/man.sh
@ -107,15 +139,15 @@ jobs:
run: .\bin\release\create_windows64_zip_package.ps1
- name: Install win64 zip and test integ
run: |
.\bin\test\test_prerequisites.ps1
.\bin\release\install_windows64_zip_package.ps1
.\bin\test\test_prerequisites.ps1
.\bin\test\test_integ.ps1
- name: Create windows64 installer
run: .\bin\release\create_windows64_installer.ps1
- name: Install win64 installer and test integ
run: |
.\bin\test\test_prerequisites.ps1
.\bin\release\install_windows64_installer.ps1
.\bin\test\test_prerequisites.ps1
.\bin\test\test_integ.ps1
- name: Archive production artifacts
uses: actions/upload-artifact@v3

View File

@ -9,25 +9,27 @@ jobs:
benchsuite:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Environment
run: bin/environment.sh
- name: Install Prerequisites
run: bin/install_prerequisites_ubuntu.sh
- name: Install Rust
run: bin/install_rust_latest.sh
- name: Build
run: bin/release/release.sh
- name: Run Bench Suite
run: bin/test/bench.sh
- name: Archive artifacts
uses: actions/upload-artifact@v3
if: ${{ always() }}
with:
name: tests-bench-artifacts
path: |
bench/server.log
- name: Checkout repository
uses: actions/checkout@v3
- name: Environment
run: bin/environment.sh
- name: Install Prerequisites
run: bin/install_prerequisites_ubuntu.sh
- name: Install Rust
run: bin/install_rust_latest.sh
- name: Build
run: |
bin/release/release.sh
echo "PATH=${PWD}/target/release:$PATH" >> "${GITHUB_ENV}"
- name: Bench Suite
run: bin/test/bench.sh
- name: Archive artifacts
uses: actions/upload-artifact@v3
if: ${{ always() }}
with:
name: tests-bench-artifacts
path: |
bench/server.log
test-ubuntu-x64-latest:
runs-on: ubuntu-latest
@ -45,9 +47,11 @@ jobs:
run: bin/install_rust_latest.sh
- name: Test Prerequisites
run: bin/test/test_prerequisites.sh
- name: Run Tests units
run: bin/test/test_unit.sh
- name: Run Integration Tests
- name: Tests units
run: |
bin/test/test_unit.sh
echo "PATH=${PWD}/target/release:$PATH" >> "${GITHUB_ENV}"
- name: Integration Tests
run: bin/test/test_integ.sh
- name: Archive production artifacts
uses: actions/upload-artifact@v3
@ -66,40 +70,42 @@ jobs:
matrix:
rust: [stable]
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install Python 3.8
uses: actions/setup-python@v4
with:
python-version: '3.8'
- name: Install Curl 7.68
uses: myci-actions/add-deb-repo@10
with:
repo: deb http://azure.archive.ubuntu.com/ubuntu/ focal main restricted
repo-name: focal
install: curl
- name: Environment
run: bin/environment.sh
- name: Install Prerequisites
run: bin/install_prerequisites_ubuntu.sh
- name: Install Rust
run: bin/install_rust_latest.sh
- name: Test Prerequisites
run: bin/test/test_prerequisites.sh
- name: Run Tests units
run: bin/test/test_unit.sh
- name: Run Integration Tests
run: bin/test/test_integ.sh
- name: Archive production artifacts
uses: actions/upload-artifact@v3
if: ${{ always() }}
with:
name: tests-ubuntu-${{ matrix.rust }}-artifacts
path: |
integration/server.log
integration/server-ssl.log
integration/report/tests.json
integration/report/tests.xml
- name: Checkout repository
uses: actions/checkout@v3
- name: Install Python 3.8
uses: actions/setup-python@v4
with:
python-version: '3.8'
- name: Install Curl 7.68
uses: myci-actions/add-deb-repo@10
with:
repo: deb http://azure.archive.ubuntu.com/ubuntu/ focal main restricted
repo-name: focal
install: curl
- name: Environment
run: bin/environment.sh
- name: Install Prerequisites
run: bin/install_prerequisites_ubuntu.sh
- name: Install Rust
run: bin/install_rust_latest.sh
- name: Test Prerequisites
run: bin/test/test_prerequisites.sh
- name: Tests units
run: |
bin/test/test_unit.sh
echo "PATH=${PWD}/target/release:$PATH" >> "${GITHUB_ENV}"
- name: Integration Tests
run: bin/test/test_integ.sh
- name: Archive production artifacts
uses: actions/upload-artifact@v3
if: ${{ always() }}
with:
name: tests-ubuntu-${{ matrix.rust }}-artifacts
path: |
integration/server.log
integration/server-ssl.log
integration/report/tests.json
integration/report/tests.xml
test-docker-archlinux-x64:
runs-on: ubuntu-latest
@ -190,9 +196,11 @@ jobs:
run: bin/install_rust_latest.sh
- name: Test Prerequisites
run: bin/test/test_prerequisites.sh
- name: Run Tests units
run: bin/test/test_unit.sh
- name: Run Integration Tests
- name: Tests units
run: |
bin/test/test_unit.sh
echo "PATH=${PWD}/target/release:$PATH" >> "${GITHUB_ENV}"
- name: Integration Tests
run: bin/test/test_integ.sh
- name: Archive production artifacts
uses: actions/upload-artifact@v3

View File

@ -3,5 +3,3 @@ set -e
set -x
time hurl tests/hello_1000.hurl

View File

@ -0,0 +1,16 @@
#!/bin/sh
set -e
echo "----- install deb package -----"
# install
package_dir="$(cd target/upload ; pwd)"
deb_package=$(ls "${package_dir}"/hurl_*_amd64.deb)
install_dir="/tmp/hurl-deb-package"
mkdir -p "${install_dir}"
dpkg -x "${deb_package}" "${install_dir}"
# Return PATH var to parent shell
package_dir="${install_dir}/usr/bin"
echo "Run this if you want to use fresh builded hurl package:"
echo " export PATH=$package_dir:$PATH"

View File

@ -5,5 +5,7 @@ PATH="$HOME"/.cargo/bin:$PATH
export PATH
cargo build --release --verbose --locked
target/release/hurl --version
# Return PATH var to parent shell
package_dir="$(cd target/release ; pwd)"
echo "Run this if you want to use fresh builded hurl package:"
echo " export PATH=$package_dir:$PATH"

View File

@ -1,3 +1,6 @@
#!/bin/sh
set -eu
echo VERSION="$(grep '^version' packages/hurl/Cargo.toml | cut -f2 -d'"')" >> "$GITHUB_ENV"
set -e
# Get hurl source version
VERSION="$(grep '^version' packages/hurl/Cargo.toml | cut -f2 -d'"')"
echo "${VERSION}"

View File

@ -1,8 +1,18 @@
#!/bin/sh
export PATH="$PWD/target/release:$PATH"
set -eu
echo "----- Bench suite -----"
# hurl infos
command -v hurl
command -v hurlfmt
hurl --version
hurlfmt --version
# bench
pip3 install --requirement bin/requirements-frozen.txt
cd bench || exit 1
cd bench
python3 server.py >server.log 2>&1 &
sleep 2
netstat -an | grep 8000
sleep 5
netstat -anpe | grep 8000
./run.sh

View File

@ -3,4 +3,5 @@ set -e
"$(dirname "$0")"/test_prerequisites.sh
"$(dirname "$0")"/test_unit.sh
export PATH="${PWD}/target/release:$PATH"
"$(dirname "$0")"/test_integ.sh

View File

@ -2,7 +2,14 @@
set -e
echo "----- integration tests -----"
export PATH="$PWD/target/release:$PATH"
# hurl infos
command -v hurl
command -v hurlfmt
hurl --version
hurlfmt --version
# integration tests
cd integration || exit
./integration.py
./test_curl_commands.sh "$(find ./tests_ok ./tests_failed -maxdepth 1 -type f -name '*.curl' ! -name '*windows*')"

View File

@ -4,3 +4,8 @@ echo "----- unit tests -----"
PATH="$HOME"/.cargo/bin:$PATH
export PATH
cargo test --release --features strict --tests
# Return PATH var to parent shell
package_dir="$(cd target/release ; pwd)"
echo "Run this if you want to use fresh builded hurl package:"
echo " export PATH=$package_dir:$PATH"