Add test-windows-wsl2-x64

This commit is contained in:
Filipe PINTO 2024-11-01 15:59:58 +01:00 committed by GitHub
parent 9b3defe208
commit 6a9645ed72
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -414,3 +414,64 @@ jobs:
path: |
./**/*.log
test-windows-wsl2-x64:
runs-on: windows-latest
steps:
- name: Set git to use LF
run: |
git config --global core.autocrlf false
git config --global core.eol lf
- name: Checkout repository
uses: actions/checkout@v4.2.1
with:
ref: ${{ inputs.branch }}
- name: Update wsl
run: |
wsl --update
wsl --version
- name: Setup wsl Ubuntu
uses: Vampire/setup-wsl@v3.1.3
with:
distribution: Ubuntu-22.04
- name: Convert to wsl2
run: |
wsl --set-version Ubuntu 2
wsl --list --verbose --all
- shell: wsl-bash {0}
run: |
# Build, Test units and Integration tests
echo "::group::Move to linux compatible workspace"
win_workspace="${{ github.workspace }}"
wsl_workspace="/mnt/$(echo "${win_workspace}" | tr -d ':' | tr '\\' '/' | tr '[:upper:]' '[:lower:]')"
linux_workspace="/tmp/hurl"
cp -frp "${wsl_workspace}" "${linux_workspace}"
cd "${linux_workspace}"
pwd
ls
echo "::endgroup::"
echo "::group::Install Prerequisites"
bin/install_prerequisites_ubuntu.sh
echo "::endgroup::"
echo "::group::Install python3 venv"
bin/install_python3_venv.sh
export PATH=/tmp/hurl-python3-venv/bin:$PATH
which python3
python3 --version
pip --version
echo "::endgroup::"
echo "::group::Install Rust"
bin/install_rust.sh
echo "::endgroup::"
echo "::group::Environment"
bin/environment.sh
echo "::endgroup::"
echo "::group::Tests"
bin/test/test.sh
echo "::endgroup::"
- name: Archive production artifacts
uses: actions/upload-artifact@v4.4.3
if: ${{ always() }}
with:
name: tests-win64-wsl2-artifacts
path: |
./**/*.log