diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..31e73b2 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,42 @@ +name: Test + +push: + branches: + - main + paths: + - '.github/workflows/test.yml' + - 'src/**' + - 'examples/test/**' + pull_request: + branches: + - main + paths: + - '.github/workflows/test.yml' + - 'src/**' + - 'examples/test/**' + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + build-and-test: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + - name: Install stable toolchain + uses: actions-rs/toolchain@v1 + with: + toolchain: stable + override: true + - uses: Swatinem/rust-cache@v1 + - name: Install native deps + run: | + sudo apt-get update + sudo apt-get install -y webkit2gtk-4.0 + wget -qO- https://github.com/tauri-apps/tauri/releases/download/cli.rs-v1.1.1/cargo-tauri-x86_64-unknown-linux-gnu.tgz | tar -xzf- + - name: Run test app + run: | + cd examples/test + cargo tauri dev --exit-on-panic --config ./src-tauri/ci.tauri.conf.json \ No newline at end of file