VPN-6348 - Add l10n docs #2426
Workflow file for this run
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: Linux 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_app: | |
name: Build Test Client | |
runs-on: ubuntu-22.04 | |
outputs: | |
matrix: ${{ steps.testGen.outputs.tests }} | |
steps: | |
- name: Clone repository | |
uses: actions/checkout@v4 | |
with: | |
submodules: "recursive" | |
- run: | | |
sudo apt-get update | |
sudo apt-get install -y $(./scripts/linux/getdeps.py -a linux/debian/control) | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: "3.9" | |
cache: "pip" | |
- run: pip install -r requirements.txt | |
- name: Compile test client | |
shell: bash | |
run: | | |
mkdir -p build/cmake | |
mkdir -p build/profile | |
cmake -S $(pwd) -B build/cmake -GNinja | |
cmake --build build/cmake --target dummyvpn | |
mkdir -p build/profile | |
rsync -a --include '*/' --include '*.gcno' --exclude '*' \ | |
build/cmake/tests/dummyvpn/CMakeFiles/dummyvpn.dir/ build/profile/ | |
cp ./build/cmake/tests/dummyvpn/dummyvpn build/ | |
cp -r ./build/cmake/tests/dummyvpn/addons build/addons | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: test-client-${{ 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 | |
runs-on: ubuntu-22.04 | |
timeout-minutes: 45 | |
strategy: | |
fail-fast: false # Don't cancel other jobs if a test fails | |
matrix: | |
test: ${{ fromJson(needs.build_test_app.outputs.matrix) }} | |
steps: | |
- name: Clone repository | |
uses: actions/checkout@v4 | |
- uses: actions/download-artifact@v4 | |
with: | |
name: test-client-${{ github.sha }} | |
path: build/ | |
- name: Install test dependecies | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y $(./scripts/linux/getdeps.py -r linux/debian/control) | |
sudo apt install --no-upgrade firefox xvfb -y | |
- 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: Check build | |
shell: bash | |
run: | | |
chmod +x ./build/dummyvpn | |
./build/dummyvpn -v | |
- name: Running ${{ matrix.test.name }} Tests | |
id: runTests | |
uses: nick-invision/retry@v3 | |
with: | |
timeout_minutes: 15 | |
max_attempts: 3 | |
command: | | |
export PATH=$GECKOWEBDRIVER:$(npm bin):$PATH | |
export HEADLESS=yes | |
export TZ=Europe/London | |
mkdir -p $ARTIFACT_DIR | |
xvfb-run -a npm run functionalTest -- --retries 3 ${{matrix.test.path}} | |
env: | |
ARTIFACT_DIR: ${{ runner.temp }}/artifacts | |
MVPN_BIN: ./build/dummyvpn | |
- name: Uploading artifacts | |
uses: actions/upload-artifact@v4 | |
if: ${{ always() }} | |
with: | |
name: ${{ matrix.test.name }} Logs | |
path: ${{ runner.temp }}/artifacts |