-
Notifications
You must be signed in to change notification settings - Fork 30
UI Automation for tauri based vpn apps #2705
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
tommyv1987
wants to merge
12
commits into
develop
Choose a base branch
from
feature/add-automation-ui
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Conversation
This file contains hidden or 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
- will run it to see, i think it will need tweaking based upon https://github.com/chippers/hello_tauri/blob/main/.github/workflows/webdriver.yml
Comment on lines
14
to
128
name: Build and Test on ${{ matrix.os }} | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-latest, windows-latest] | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 21 | ||
cache: 'npm' | ||
|
||
- name: Install npm dependencies | ||
run: npm ci | ||
|
||
- name: Create dist directory | ||
run: mkdir -p dist | ||
|
||
- name: Install Rust stable | ||
uses: dtolnay/rust-toolchain@stable | ||
with: | ||
toolchain: stable | ||
|
||
- name: Install Tauri dependencies (Ubuntu) | ||
if: matrix.os == 'ubuntu-latest' | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y \ | ||
libgtk-3-dev \ | ||
libwebkit2gtk-4.0-dev \ | ||
libappindicator3-dev \ | ||
librsvg2-dev \ | ||
patchelf \ | ||
webkit2gtk-driver \ | ||
xvfb \ | ||
protobuf-compiler | ||
|
||
- name: Install Protobuf (Windows) | ||
if: matrix.os == 'windows-latest' | ||
run: | | ||
choco install protoc | ||
|
||
- name: Install cargo-hack from crates.io | ||
uses: baptiste0928/cargo-install@v3 | ||
with: | ||
crate: tauri-driver | ||
version: '2.0.4' | ||
|
||
# Build the Tauri app (without code signing) | ||
- name: Build Tauri application | ||
env: | ||
RUST_LOG: info,nym_vpn_app=trace | ||
run: npm run tauri build | ||
|
||
- name: Install WebdriverIO dependencies | ||
run: npm install @wdio/cli @wdio/local-runner @wdio/mocha-framework @wdio/spec-reporter | ||
|
||
- name: Run WebdriverIO tests (Linux) | ||
if: matrix.os == 'ubuntu-latest' | ||
env: | ||
CI: true | ||
RUST_LOG: info,nym_vpn_app=trace | ||
run: xvfb-run npx wdio run wdio.conf.js | ||
|
||
- name: Run WebdriverIO tests (Windows) | ||
if: matrix.os == 'windows-latest' | ||
env: | ||
CI: true | ||
RUST_LOG: info,nym_vpn_app=trace | ||
run: npx wdio run wdio.conf.js | ||
|
||
- name: Run WebdriverIO tests (macOS) | ||
if: matrix.os == 'macos-latest' | ||
env: | ||
CI: true | ||
RUST_LOG: info,nym_vpn_app=trace | ||
run: npx wdio run wdio.conf.js | ||
|
||
- name: Upload test screenshots | ||
if: failure() | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: test-screenshots-${{ matrix.os }} | ||
path: ./screenshots | ||
if-no-files-found: ignore | ||
|
||
- name: Upload test reports | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: test-reports-${{ matrix.os }} | ||
path: ./reports | ||
if-no-files-found: ignore | ||
|
||
- name: Package Linux artifacts | ||
if: matrix.os == 'ubuntu-latest' | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: nym-vpn-linux | ||
path: | | ||
src-tauri/target/release/bundle/deb/*.deb | ||
src-tauri/target/release/bundle/appimage/*.AppImage | ||
if-no-files-found: warn | ||
|
||
- name: Package Windows artifacts | ||
if: matrix.os == 'windows-latest' | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: nym-vpn-windows | ||
path: src-tauri/target/release/bundle/msi/*.msi | ||
if-no-files-found: warn |
Check warning
Code scanning / CodeQL
Workflow does not contain permissions Medium
Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}
); | ||
if (fs.existsSync(killScriptPath)) { | ||
console.log('Running kill_processes.sh as final cleanup step...'); | ||
execSync(`bash ${killScriptPath}`, { stdio: 'inherit' }); |
Check warning
Code scanning / CodeQL
Shell command built from environment values Medium
This shell command depends on an uncontrolled .
This shell command depends on an uncontrolled .
absolute path
Error loading related location
Loading This shell command depends on an uncontrolled
absolute path
Error loading related location
Loading - TODO figure out how to ensure the build bundles the vpnd correctly, but this isn't essential - Factor in all elements, things aren't the same as what they are app:browser mode - so some tests are failing, and prepare the app notification in pop up menus - Build compilation errors when trying to compile a full windows - WebviewArgs - were the right way to go giving the chaos here: SeleniumHQ/selenium#15340
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
npm run browser:dev
without the backend on MacTODO
This change is