[Bot] Update i18n on 2.25.0 #4474
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: WebAssembly Tests | |
on: | |
push: | |
branches: | |
- main | |
- "releases/**" | |
pull_request: | |
branches: | |
- main | |
- "releases/**" | |
# Restrict tests to the most recent commit. | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
build_test_addons: | |
name: Build Test Addons | |
uses: ./.github/workflows/build_addons.yaml | |
with: | |
test-addons-name: test-addons-${{ github.sha }} | |
build_test_app: | |
name: Wasm Qt6 | |
runs-on: ubuntu-20.04 | |
outputs: | |
matrix: ${{ steps.testGen.outputs.tests }} | |
env: | |
QTVERSION: 6.2.4 | |
steps: | |
- name: Clone repository | |
uses: actions/checkout@v4 | |
with: | |
submodules: "true" | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: "3.9" | |
cache: "pip" | |
- run: pip install -r requirements.txt | |
- name: Install Qt6 | |
shell: bash | |
run: | | |
# qt6.2.4 for wasm needs the desktop linux installation | |
python -m aqt install-qt -O /opt linux desktop $QTVERSION | |
python -m aqt install-qt -O /opt linux desktop $QTVERSION wasm_32 -m qtcharts qtwebsockets qt5compat | |
- name: Setup emsdk | |
uses: mymindstorm/setup-emsdk@v14 | |
with: | |
# Emscripten does not guarantee ABI compatibility, we should use the | |
# same version used to build Qt. See: | |
# https://doc.qt.io/qt-6/wasm.html#installing-emscripten | |
version: 2.0.14 | |
- name: Compile test client | |
shell: bash | |
run: | | |
export PATH=/opt/$QTVERSION/wasm_32/bin:/opt/$QTVERSION/gcc_64/bin:$PATH | |
mkdir -p build/cmake | |
/opt/$QTVERSION/wasm_32/bin/qt-cmake -S $(pwd) -B build/cmake -DCMAKE_BUILD_TYPE=Release \ | |
-DQT_HOST_PATH_CMAKE_DIR=/opt/$QTVERSION/gcc_64/lib/cmake \ | |
-DQT_HOST_PATH=/opt/$QTVERSION/gcc_64 \ | |
-DBUILD_TESTS=OFF | |
cmake --build build/cmake -j4 | |
cp -r build/cmake/wasm_build build/wasm_build | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: test-wasm-${{ github.sha }} | |
path: | | |
build/ | |
!build/cmake/ | |
- name: Generate tasklist | |
id: testGen | |
shell: bash | |
run: | | |
echo -n "tests=" >> $GITHUB_OUTPUT | |
for test in $(find tests/functional -name 'test*.js' | sort); do | |
printf '{"name": "%s", "path": "%s"}' $(basename ${test%.js} | sed -n 's/test//p') $test | |
done | jq -s -c >> $GITHUB_OUTPUT | |
- name: Check tests | |
shell: bash | |
env: | |
TEST_LIST: ${{ steps.testGen.outputs.tests }} | |
run: | | |
echo $TEST_LIST | jq | |
functionaltests: | |
name: Functional tests | |
needs: | |
- build_test_app | |
- build_test_addons | |
runs-on: ubuntu-20.04 | |
timeout-minutes: 45 | |
strategy: | |
fail-fast: false # Don't cancel other jobs if a test fails | |
matrix: | |
test: ${{ fromJson(needs.wasmQt6.outputs.matrix) }} | |
env: | |
QTVERSION: 6.2.4 | |
steps: | |
- name: Clone repository | |
uses: actions/checkout@v4 | |
- uses: actions/download-artifact@v4 | |
with: | |
name: test-wasm-${{ github.sha }} | |
path: build/ | |
- uses: actions/download-artifact@v4 | |
with: | |
name: test-addons-${{ github.sha }} | |
path: build/addons/ | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: "3.9" | |
cache: "pip" | |
- run: pip install -r requirements.txt | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 18 | |
cache: "npm" | |
- run: npm install | |
- name: Install test dependecies | |
run: | | |
sudo apt install --no-upgrade firefox xvfb -y | |
- name: Running ${{ matrix.test.name }} Tests | |
id: runTests | |
env: | |
HEADLESS: yes | |
WASM_BUILD_DIRECTORY: ${{ github.workspace }}/build/wasm_build | |
MVPN_ADDONS_PATH: ${{ github.workspace }}/build/addons | |
run: | | |
export PATH=$GECKOWEBDRIVER:$(npm bin):$PATH | |
xvfb-run -a npm run functionalTestWasm -- --retries 3 ${{ matrix.test.path }} |