ci: Add v2 tests (#797)
* ci: Add v2 tests * fix env var name * and so the logging begins * moar * fix? * lol * rm debug logs
113
.github/workflows/test-action.yml
vendored
@@ -8,14 +8,14 @@ on:
|
||||
- dev
|
||||
|
||||
jobs:
|
||||
build:
|
||||
v1:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- platform: 'macos-latest'
|
||||
args: '--verbose --target universal-apple-darwin'
|
||||
- platform: 'ubuntu-latest'
|
||||
- platform: 'ubuntu-20.04'
|
||||
args: '--verbose'
|
||||
- platform: 'windows-latest'
|
||||
args: '--verbose'
|
||||
@@ -39,7 +39,7 @@ jobs:
|
||||
# example-with-tauri tests the auto installation of the tauri cli
|
||||
- name: install example dependencies
|
||||
run: pnpm install
|
||||
working-directory: ./__fixtures__/example
|
||||
working-directory: ./__fixtures__/example-v1
|
||||
|
||||
# rust
|
||||
- name: install Rust stable
|
||||
@@ -51,12 +51,12 @@ jobs:
|
||||
with:
|
||||
cache-on-failure: true
|
||||
workspaces: |
|
||||
./__fixtures__/example/src-tauri -> ../../target
|
||||
./__fixtures__/example-with-tauri/src-tauri -> ../../target
|
||||
./__fixtures__/example-v1/src-tauri -> ../../target
|
||||
./__fixtures__/example-with-tauri-v1/src-tauri -> ../../target
|
||||
|
||||
# system
|
||||
- name: install dependencies (ubuntu only)
|
||||
if: matrix.platform == 'ubuntu-latest'
|
||||
if: matrix.platform == 'ubuntu-20.04'
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y libwebkit2gtk-4.0-dev libappindicator3-dev librsvg2-dev
|
||||
@@ -68,11 +68,11 @@ jobs:
|
||||
# Updater signature is exposed here to make sure it works in PR's
|
||||
TAURI_PRIVATE_KEY: dW50cnVzdGVkIGNvbW1lbnQ6IHJzaWduIGVuY3J5cHRlZCBzZWNyZXQga2V5ClJXUlRZMEl5YTBGV3JiTy9lRDZVd3NkL0RoQ1htZmExNDd3RmJaNmRMT1ZGVjczWTBKZ0FBQkFBQUFBQUFBQUFBQUlBQUFBQWdMekUzVkE4K0tWQ1hjeGt1Vkx2QnRUR3pzQjVuV0ZpM2czWXNkRm9hVUxrVnB6TUN3K1NheHJMREhQbUVWVFZRK3NIL1VsMDBHNW5ET1EzQno0UStSb21nRW4vZlpTaXIwZFh5ZmRlL1lSN0dKcHdyOUVPclVvdzFhVkxDVnZrbHM2T1o4Tk1NWEU9Cg==
|
||||
with:
|
||||
projectPath: ./__fixtures__/example-with-tauri
|
||||
projectPath: ./__fixtures__/example-with-tauri-v1
|
||||
includeDebug: true
|
||||
includeRelease: false
|
||||
tagName: ${{ github.event.pull_request.head.repo.full_name == github.repository && 'example-with-tauri-v__VERSION__' || '' }}
|
||||
releaseName: 'Release example with preconfigured Tauri app v__VERSION__'
|
||||
releaseName: 'Release example with preconfigured Tauri app v__VERSION__ for tauri-v1'
|
||||
releaseBody: 'See the assets to download this version and install.'
|
||||
releaseDraft: true
|
||||
args: ${{ matrix.args }}
|
||||
@@ -84,7 +84,7 @@ jobs:
|
||||
# Updater signature is exposed here to make sure it works in PR's
|
||||
TAURI_PRIVATE_KEY: dW50cnVzdGVkIGNvbW1lbnQ6IHJzaWduIGVuY3J5cHRlZCBzZWNyZXQga2V5ClJXUlRZMEl5YTBGV3JiTy9lRDZVd3NkL0RoQ1htZmExNDd3RmJaNmRMT1ZGVjczWTBKZ0FBQkFBQUFBQUFBQUFBQUlBQUFBQWdMekUzVkE4K0tWQ1hjeGt1Vkx2QnRUR3pzQjVuV0ZpM2czWXNkRm9hVUxrVnB6TUN3K1NheHJMREhQbUVWVFZRK3NIL1VsMDBHNW5ET1EzQno0UStSb21nRW4vZlpTaXIwZFh5ZmRlL1lSN0dKcHdyOUVPclVvdzFhVkxDVnZrbHM2T1o4Tk1NWEU9Cg==
|
||||
with:
|
||||
projectPath: ./__fixtures__/example
|
||||
projectPath: ./__fixtures__/example-v1
|
||||
distPath: ../dist # relative to tauri.conf.json
|
||||
iconPath: ./icon.png # relative to projectPath
|
||||
bundleIdentifier: com.tauri.actiontest
|
||||
@@ -93,7 +93,100 @@ jobs:
|
||||
includeDebug: true
|
||||
includeRelease: false
|
||||
tagName: ${{ github.event.pull_request.head.repo.full_name == github.repository && 'example-v__VERSION__' || '' }}
|
||||
releaseName: 'Release example app v__VERSION__'
|
||||
releaseName: 'Release example app v__VERSION__ for tauri-v1'
|
||||
releaseBody: 'See the assets to download this version and install.'
|
||||
releaseDraft: true
|
||||
args: ${{ matrix.args }}
|
||||
|
||||
v2:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- platform: 'macos-latest'
|
||||
args: '--verbose --target universal-apple-darwin'
|
||||
- platform: 'ubuntu-22.04'
|
||||
args: '--verbose'
|
||||
- platform: 'windows-latest'
|
||||
args: '--verbose'
|
||||
|
||||
runs-on: ${{ matrix.platform }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
# node
|
||||
- name: install pnpm
|
||||
uses: pnpm/action-setup@v4
|
||||
with:
|
||||
version: 9.x.x
|
||||
|
||||
- name: setup node
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: lts/*
|
||||
cache: pnpm
|
||||
|
||||
# TODO: example-with-tauri tests the auto installation of the tauri cli
|
||||
- name: install example dependencies
|
||||
run: |
|
||||
cd ./__fixtures__/example-v2
|
||||
pnpm install
|
||||
cd ../example-with-tauri-v2
|
||||
pnpm install
|
||||
|
||||
# rust
|
||||
- name: install Rust stable
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
with:
|
||||
targets: aarch64-apple-darwin,x86_64-apple-darwin
|
||||
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
with:
|
||||
cache-on-failure: true
|
||||
workspaces: |
|
||||
./__fixtures__/example-v2/src-tauri -> ../../target
|
||||
./__fixtures__/example-with-tauri-v2/src-tauri -> ../../target
|
||||
|
||||
# system
|
||||
- name: install dependencies (ubuntu only)
|
||||
if: matrix.platform == 'ubuntu-22.04'
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev
|
||||
|
||||
- name: Preconfigured Tauri Project
|
||||
uses: ./
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
# Updater signature is exposed here to make sure it works in PR's
|
||||
TAURI_SIGNING_PRIVATE_KEY: dW50cnVzdGVkIGNvbW1lbnQ6IHJzaWduIGVuY3J5cHRlZCBzZWNyZXQga2V5ClJXUlRZMEl5YTBGV3JiTy9lRDZVd3NkL0RoQ1htZmExNDd3RmJaNmRMT1ZGVjczWTBKZ0FBQkFBQUFBQUFBQUFBQUlBQUFBQWdMekUzVkE4K0tWQ1hjeGt1Vkx2QnRUR3pzQjVuV0ZpM2czWXNkRm9hVUxrVnB6TUN3K1NheHJMREhQbUVWVFZRK3NIL1VsMDBHNW5ET1EzQno0UStSb21nRW4vZlpTaXIwZFh5ZmRlL1lSN0dKcHdyOUVPclVvdzFhVkxDVnZrbHM2T1o4Tk1NWEU9Cg==
|
||||
with:
|
||||
projectPath: ./__fixtures__/example-with-tauri-v2
|
||||
includeDebug: true
|
||||
includeRelease: false
|
||||
tagName: ${{ github.event.pull_request.head.repo.full_name == github.repository && 'example-with-tauri-v__VERSION__' || '' }}
|
||||
releaseName: 'Release example with preconfigured Tauri app v__VERSION__ for tauri-v2'
|
||||
releaseBody: 'See the assets to download this version and install.'
|
||||
releaseDraft: true
|
||||
args: ${{ matrix.args }}
|
||||
|
||||
- name: Frontend-only Project
|
||||
uses: ./
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
# Updater signature is exposed here to make sure it works in PR's
|
||||
TAURI_SIGNING_PRIVATE_KEY: dW50cnVzdGVkIGNvbW1lbnQ6IHJzaWduIGVuY3J5cHRlZCBzZWNyZXQga2V5ClJXUlRZMEl5YTBGV3JiTy9lRDZVd3NkL0RoQ1htZmExNDd3RmJaNmRMT1ZGVjczWTBKZ0FBQkFBQUFBQUFBQUFBQUlBQUFBQWdMekUzVkE4K0tWQ1hjeGt1Vkx2QnRUR3pzQjVuV0ZpM2czWXNkRm9hVUxrVnB6TUN3K1NheHJMREhQbUVWVFZRK3NIL1VsMDBHNW5ET1EzQno0UStSb21nRW4vZlpTaXIwZFh5ZmRlL1lSN0dKcHdyOUVPclVvdzFhVkxDVnZrbHM2T1o4Tk1NWEU9Cg==
|
||||
with:
|
||||
projectPath: ./__fixtures__/example-v2
|
||||
distPath: ../dist # relative to tauri.conf.json
|
||||
iconPath: ./icon.png # relative to projectPath
|
||||
bundleIdentifier: com.tauri.actiontest
|
||||
appName: example
|
||||
appVersion: ../package.json # relative to tauri.conf.json
|
||||
includeDebug: true
|
||||
includeRelease: false
|
||||
tagName: ${{ github.event.pull_request.head.repo.full_name == github.repository && 'example-v__VERSION__' || '' }}
|
||||
releaseName: 'Release example app v__VERSION__ for tauri-v2'
|
||||
releaseBody: 'See the assets to download this version and install.'
|
||||
releaseDraft: true
|
||||
args: ${{ matrix.args }}
|
||||
|
||||
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "example",
|
||||
"version": "0.1.1",
|
||||
"version": "0.0.1",
|
||||
"description": "",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
BIN
__fixtures__/example-v2/icon.png
Normal file
|
After Width: | Height: | Size: 16 KiB |
14
__fixtures__/example-v2/package.json
Normal file
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"name": "example",
|
||||
"version": "0.0.2",
|
||||
"description": "",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"author": "",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@tauri-apps/cli": "next"
|
||||
}
|
||||
}
|
||||
1
__fixtures__/example-with-tauri-v1/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
dist/index.tauri.html
|
||||
7
__fixtures__/example-with-tauri-v1/dist/index.html
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head></head>
|
||||
<body>
|
||||
<h3>Hello!</h3>
|
||||
</body>
|
||||
</html>
|
||||
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 37 KiB After Width: | Height: | Size: 37 KiB |
|
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 2.3 KiB |
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 19 KiB |
|
Before Width: | Height: | Size: 41 KiB After Width: | Height: | Size: 41 KiB |
|
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.1 KiB |
|
Before Width: | Height: | Size: 45 KiB After Width: | Height: | Size: 45 KiB |
|
Before Width: | Height: | Size: 3.7 KiB After Width: | Height: | Size: 3.7 KiB |
|
Before Width: | Height: | Size: 7.2 KiB After Width: | Height: | Size: 7.2 KiB |
|
Before Width: | Height: | Size: 9.6 KiB After Width: | Height: | Size: 9.6 KiB |
|
Before Width: | Height: | Size: 4.4 KiB After Width: | Height: | Size: 4.4 KiB |
|
Before Width: | Height: | Size: 56 KiB After Width: | Height: | Size: 56 KiB |
|
Before Width: | Height: | Size: 88 KiB After Width: | Height: | Size: 88 KiB |
@@ -6,7 +6,8 @@
|
||||
"beforeBuildCommand": ""
|
||||
},
|
||||
"package": {
|
||||
"productName": "TauriExample App"
|
||||
"productName": "TauriExample App",
|
||||
"version": "0.1.1"
|
||||
},
|
||||
"tauri": {
|
||||
"bundle": {
|
||||
1
__fixtures__/example-with-tauri-v2/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
dist/index.tauri.html
|
||||
7
__fixtures__/example-with-tauri-v2/dist/index.html
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head></head>
|
||||
<body>
|
||||
<h3>Hello!</h3>
|
||||
</body>
|
||||
</html>
|
||||
14
__fixtures__/example-with-tauri-v2/package.json
Normal file
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"name": "example-with-tauri",
|
||||
"version": "0.1.1",
|
||||
"description": "",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"author": "",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@tauri-apps/cli": "next"
|
||||
}
|
||||
}
|
||||
10
__fixtures__/example-with-tauri-v2/src-tauri/.gitignore
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
# Generated by Cargo
|
||||
# will have compiled files and executables
|
||||
/target/
|
||||
WixTools
|
||||
|
||||
# These are backup files generated by rustfmt
|
||||
**/*.rs.bk
|
||||
|
||||
config.json
|
||||
bundle.json
|
||||
19
__fixtures__/example-with-tauri-v2/src-tauri/Cargo.toml
Normal file
@@ -0,0 +1,19 @@
|
||||
[package]
|
||||
name = "test-app"
|
||||
version = "0.1.0"
|
||||
description = "A Tauri App"
|
||||
authors = [ "you" ]
|
||||
license = ""
|
||||
repository = ""
|
||||
edition = "2021"
|
||||
|
||||
[dependencies]
|
||||
serde_json = "1"
|
||||
serde = { version = "1", features = [ "derive" ] }
|
||||
tauri = { version = "2.0.0-beta", features = [] }
|
||||
|
||||
[build-dependencies]
|
||||
tauri-build = { version = "2.0.0-beta", features = [] }
|
||||
|
||||
[features]
|
||||
prod = [ "tauri/custom-protocol" ]
|
||||
3
__fixtures__/example-with-tauri-v2/src-tauri/build.rs
Normal file
@@ -0,0 +1,3 @@
|
||||
fn main() {
|
||||
tauri_build::build()
|
||||
}
|
||||
BIN
__fixtures__/example-with-tauri-v2/src-tauri/icons/128x128.png
Normal file
|
After Width: | Height: | Size: 16 KiB |
|
After Width: | Height: | Size: 37 KiB |
BIN
__fixtures__/example-with-tauri-v2/src-tauri/icons/32x32.png
Normal file
|
After Width: | Height: | Size: 2.3 KiB |
|
After Width: | Height: | Size: 12 KiB |
|
After Width: | Height: | Size: 18 KiB |
|
After Width: | Height: | Size: 19 KiB |
|
After Width: | Height: | Size: 41 KiB |
|
After Width: | Height: | Size: 2.1 KiB |
|
After Width: | Height: | Size: 45 KiB |
|
After Width: | Height: | Size: 3.7 KiB |
|
After Width: | Height: | Size: 7.2 KiB |
|
After Width: | Height: | Size: 9.6 KiB |
BIN
__fixtures__/example-with-tauri-v2/src-tauri/icons/StoreLogo.png
Normal file
|
After Width: | Height: | Size: 4.4 KiB |
BIN
__fixtures__/example-with-tauri-v2/src-tauri/icons/icon.icns
Normal file
BIN
__fixtures__/example-with-tauri-v2/src-tauri/icons/icon.ico
Normal file
|
After Width: | Height: | Size: 56 KiB |
BIN
__fixtures__/example-with-tauri-v2/src-tauri/icons/icon.png
Normal file
|
After Width: | Height: | Size: 88 KiB |
7
__fixtures__/example-with-tauri-v2/src-tauri/src/main.rs
Normal file
@@ -0,0 +1,7 @@
|
||||
#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")]
|
||||
|
||||
fn main() {
|
||||
tauri::Builder::default()
|
||||
.run(tauri::generate_context!())
|
||||
.expect("error while running tauri application");
|
||||
}
|
||||
31
__fixtures__/example-with-tauri-v2/src-tauri/tauri.conf.json
Normal file
@@ -0,0 +1,31 @@
|
||||
{
|
||||
"productName": "TauriExample App",
|
||||
"version": "0.1.2",
|
||||
"identifier": "com.tauri.actiontest",
|
||||
"build": {
|
||||
"frontendDist": "../dist"
|
||||
},
|
||||
"app": {
|
||||
"windows": [
|
||||
{
|
||||
"title": "Tauri App",
|
||||
"width": 800,
|
||||
"height": 600
|
||||
}
|
||||
],
|
||||
"security": {
|
||||
"csp": null
|
||||
}
|
||||
},
|
||||
"bundle": {
|
||||
"active": true,
|
||||
"targets": "all",
|
||||
"icon": [
|
||||
"icons/32x32.png",
|
||||
"icons/128x128.png",
|
||||
"icons/128x128@2x.png",
|
||||
"icons/icon.icns",
|
||||
"icons/icon.ico"
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
max_width = 100
|
||||
hard_tabs = false
|
||||
tab_spaces = 2
|
||||
newline_style = "Auto"
|
||||
use_small_heuristics = "Default"
|
||||
reorder_imports = true
|
||||
reorder_modules = true
|
||||
remove_nested_parens = true
|
||||
edition = "2018"
|
||||
merge_derives = true
|
||||
use_try_shorthand = false
|
||||
use_field_init_shorthand = false
|
||||
force_explicit_abi = true
|
||||