mirror of
https://github.com/Orange-OpenSource/hurl.git
synced 2024-12-23 11:02:43 +03:00
Run test integ on deb package
This commit is contained in:
parent
ecbab75b5d
commit
df705c8670
52
.github/workflows/release.yml
vendored
52
.github/workflows/release.yml
vendored
@ -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
|
||||
|
30
.github/workflows/test.yml
vendored
30
.github/workflows/test.yml
vendored
@ -18,8 +18,10 @@ jobs:
|
||||
- name: Install Rust
|
||||
run: bin/install_rust_latest.sh
|
||||
- name: Build
|
||||
run: bin/release/release.sh
|
||||
- name: Run Bench Suite
|
||||
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
|
||||
@ -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
|
||||
@ -86,9 +90,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
|
||||
@ -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
|
||||
|
@ -3,5 +3,3 @@ set -e
|
||||
set -x
|
||||
|
||||
time hurl tests/hello_1000.hurl
|
||||
|
||||
|
||||
|
16
bin/release/install_deb_package.sh
Executable file
16
bin/release/install_deb_package.sh
Executable 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"
|
@ -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"
|
||||
|
@ -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}"
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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*')"
|
||||
|
@ -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"
|
||||
|
Loading…
Reference in New Issue
Block a user