Code Monkey home page Code Monkey logo

docker-tauri's Introduction

Tauri Docker Image

img-docker img-github-actions

Full-featured Tauri Docker Image based on Rust non-slim Debian images including:

Warning

(*) tauri-driver is currently in pre-alpha
Check the official documentation for more information.

This image is a good base for CIs (builds, unit & e2e tests, etc) as well as for local runs.

Images are automatically updated on a daily basis.



Supported tags and respective Dockerfile links

E2E Testing

WebDriverIO

Since tauri-driver is available as a global command in this image, you can use it as is in wdio.config.js (see documentation):

// ...

const config = {
  // ...

  beforeSession: () => {
    // => No need for that: `path.resolve(os.homedir(), '.cargo', 'bin', 'tauri-driver')`
    tauriDriver = spawn("tauri-driver", [], {
      stdio: [null, process.stdout, process.stderr],
    });
  },

  // ...
};

// ...

Continuous Integration

Github Actions

Example:

jobs:
  core_unit_test:
    name: Core Unit Test
    runs-on: ubuntu-latest
    container:
      image: ivangabriele/tauri:debian-bullseye-18
      # This is REQUIRED if you use `tarpaulin`
      # https://github.com/xd009642/tarpaulin/issues/146
      # https://github.com/xd009642/tarpaulin#github-actions
      options: --security-opt seccomp=unconfined
    steps:
      - name: Checkout
        uses: actions/checkout@v3
      - name: Run
        run: cargo test
        working-directory: ./src-tauri
      # https://github.com/xd009642/tarpaulin#github-actions
      - name: Generate Coverage
        run: cargo tarpaulin --all-features --out Xml --timeout 120 --verbose
        working-directory: ./src-tauri
      # Add any other step here to upload your coverage somewhere

  e2e_test:
    name: E2E Test
    runs-on: ubuntu-latest
    container:
      image: ivangabriele/tauri:debian-bullseye-18
    steps:
      - name: Checkout
        uses: actions/checkout@v3
      - name: Install Node.js dependencies
        run: yarn --frozen-lockfile # or `npm ci`
      - name: Build
        # Add your core + webview build command(s)
        run: ...
      # I recommend using `nick-fields/retry@v2` action here
      # with a `fuser -n tcp -k 4445` command to kill the process using (likely Selenium)
      # since WebdriverIO often hangs out during the first run (unable to connect)
      - name: Run tests
        uses: nick-fields/retry@v2
        with:
          timeout_seconds: 600
          max_attempts: 3
          retry_on: error
          # https://tauri.app/v1/guides/testing/webdriver/ci
          command: |
            fuser -n tcp -k 4445
            xvfb-run wdio run ./configs/wdio.config.js

Roadmap

Excepted Ubuntu, all those planned distributions are a maybe for now.

  • Arch
  • Fedora 38
  • NixOS
  • openSUSE
  • Ubuntu 22

Contribute

X is the OS name + version (one of debian-bookworm, debian-bullseye, fedora-37).
y is the Node.js tag (18).
Z is the Rust variant (-nightly or nothing).

Prerequisites

Build

make build-X-Y # with no variant
make build-X-Y-Z

Example: make build-debian-bullseye-18 or make build-debian-bullseye-18-nightly.

Run

make run-X-Y # with no variant
make run-X-Y-Z

Example: make run-debian-bullseye-18 or make run-debian-bullseye-18-nightly.

Test

You need to have Node.js installed in order to run tests: node

make test-X-Y # with no variant
make test-X-Y-Z

Example: make test-debian-bullseye-18 or make test-debian-bullseye-18-nightly.


docker-tauri's People

Contributors

ivangabriele avatar renovate[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

docker-tauri's Issues

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Ignored or Blocked

These are blocked by an existing closed PR and will not be recreated unless you click a checkbox below.

Detected dependencies

dockerfile
dockerfiles/debian-bookworm-18-nightly.Dockerfile
dockerfiles/debian-bookworm-18.Dockerfile
dockerfiles/debian-bullseye-18-nightly.Dockerfile
dockerfiles/debian-bullseye-18.Dockerfile
dockerfiles/fedora-37-18-nightly.Dockerfile
  • fedora 37
dockerfiles/fedora-37-18.Dockerfile
  • fedora 37
github-actions
.github/workflows/main.yml
  • actions/checkout v4
  • actions/upload-artifact v4
  • actions/checkout v4
  • actions/setup-node v4
  • actions/download-artifact v4
  • actions/checkout v4
  • actions/download-artifact v4
  • docker/login-action v3
  • peter-evans/dockerhub-description v4

  • Check this box to trigger a request for Renovate to run again on this repository

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.