-
Notifications
You must be signed in to change notification settings - Fork 117
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8245 from mozilla-mobile/5560-goodbye-auth-tests
VPN-5560 - Do not run auth_tests on PRs
- Loading branch information
Showing
3 changed files
with
198 additions
and
27 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,129 @@ | ||
name: Auth Tests | ||
on: | ||
# Only run on push to main or release branches. | ||
push: | ||
branches: | ||
- main | ||
- "releases/**" | ||
|
||
# Restrict tests to the most recent commit. | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
linux-unit-tests: | ||
runs-on: ubuntu-22.04 | ||
name: Run auth tests on Linux | ||
steps: | ||
- name: Clone repository | ||
uses: actions/checkout@v3 | ||
with: | ||
submodules: "recursive" | ||
|
||
- name: Install dependences | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y $(./scripts/linux/getdeps.py -a linux/debian/control) | ||
pip3 install -r requirements.txt | ||
- name: Building tests | ||
shell: bash | ||
run: | | ||
mkdir -p build | ||
cmake -S . -B $(pwd)/build \ | ||
-DCMAKE_CXX_FLAGS=--coverage -DCMAKE_EXE_LINKER_FLAGS=--coverage | ||
cmake --build $(pwd)/build --target app_auth_tests -j$(nproc) | ||
- name: Running tests | ||
shell: bash | ||
working-directory: ./build/tests/auth_tests | ||
run: | | ||
export PATH=${{github.workspace}}/grcov-build/bin:$PATH | ||
ctest --output-on-failure | ||
macos-unit-tests: | ||
runs-on: macos-latest | ||
name: Run auth tests on MacOS | ||
|
||
steps: | ||
- name: Clone repository | ||
uses: actions/checkout@v3 | ||
with: | ||
submodules: "recursive" | ||
|
||
- name: Install dependencies | ||
shell: bash | ||
run: | | ||
pip3 install -r requirements.txt | ||
brew install ninja | ||
- name: Install Qt6 | ||
shell: bash | ||
run: | | ||
wget https://firefox-ci-tc.services.mozilla.com/api/index/v1/task/mozillavpn.v2.mozillavpn.cache.level-3.toolchains.v3.qt-mac.latest/artifacts/public%2Fbuild%2Fqt6_mac.zip -O mac.zip | ||
unzip -a mac.zip | ||
sudo mv qt_dist /opt | ||
cd .. | ||
- name: Install Grcov | ||
if: steps.cache-grcov.outputs.cache-hit != 'true' | ||
shell: bash | ||
run: | | ||
cargo install grcov --root ${{github.workspace}}/grcov-build --version 0.8.13 | ||
- name: Building tests | ||
shell: bash | ||
run: | | ||
export PATH=/opt/qt_dist/bin:${{github.workspace}}/grcov-build/bin:$PATH | ||
mkdir -p build | ||
cmake -S . -B $(pwd)/build -GNinja \ | ||
-DCMAKE_CXX_FLAGS=--coverage -DCMAKE_EXE_LINKER_FLAGS=--coverage | ||
cmake --build $(pwd)/build --target app_auth_tests | ||
- name: Running tests | ||
shell: bash | ||
working-directory: ./build/tests/auth_tests | ||
run: | | ||
export PATH=/opt/qt_dist/bin:${{github.workspace}}/grcov-build/bin:$PATH | ||
ctest --output-on-failure | ||
windows-unit-tests: | ||
name: Run auth tests on Windows | ||
runs-on: windows-latest | ||
|
||
steps: | ||
- name: Clone repository | ||
uses: actions/checkout@v3 | ||
with: | ||
submodules: "recursive" | ||
|
||
- name: Install Qt | ||
shell: pwsh | ||
run: | | ||
Invoke-WebRequest -Uri https://firefox-ci-tc.services.mozilla.com/api/index/v1/task/mozillavpn.v2.mozillavpn.cache.level-3.toolchains.v3.qt-win.latest/artifacts/public%2Fbuild%2Fqt6_win.zip -OutFile win.zip | ||
Expand-Archive win.zip | ||
mv win\QT_OUT "C:\\MozillaVPNBuild" | ||
- name: Add msvc dev commands to PATH | ||
uses: ilammy/msvc-dev-cmd@v1 | ||
|
||
- name: Add msbuild to PATH | ||
uses: microsoft/[email protected] | ||
|
||
- name: Install depedencies | ||
shell: bash | ||
run: | | ||
pip3 install -r requirements.txt | ||
- name: Building tests | ||
run: | | ||
mkdir ./build | ||
cmake -S . -B ./build -GNinja -DCMAKE_BUILD_TYPE=Debug -DCMAKE_PREFIX_PATH="C:\MozillaVPNBuild\lib\cmake" | ||
cmake --build ./build --target app_auth_tests | ||
- name: Running tests | ||
shell: bash | ||
working-directory: ./build/tests/auth_tests | ||
run: | | ||
ctest --output-on-failure |
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
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