2021-04-27 17:14:24 +03:00
|
|
|
# Copyright 2019-2021 Tauri Programme within The Commons Conservancy
|
|
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
# SPDX-License-Identifier: MIT
|
|
|
|
|
|
|
|
name: test create-tauri-app
|
|
|
|
|
|
|
|
on:
|
|
|
|
workflow_dispatch:
|
|
|
|
inputs:
|
2021-05-12 22:25:44 +03:00
|
|
|
platform:
|
|
|
|
default: "ubuntu"
|
2021-04-27 17:14:24 +03:00
|
|
|
pull_request:
|
|
|
|
paths:
|
|
|
|
- "tooling/create-tauri-app/**"
|
|
|
|
|
|
|
|
env:
|
|
|
|
RUST_BACKTRACE: 1
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
create-recipe-with-npm:
|
|
|
|
name: "node@${{ matrix.node }} + npm@${{ matrix.manager }}: ${{ matrix.recipe }}"
|
2021-05-31 18:53:27 +03:00
|
|
|
runs-on: ${{ github.event.inputs.platform || 'ubuntu' }}-latest
|
2021-04-27 17:14:24 +03:00
|
|
|
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
node: ["14", "16"]
|
|
|
|
manager: ["6", "7"]
|
2021-08-02 05:47:31 +03:00
|
|
|
recipe: ["vanillajs", "cra", "vite", "ngcli", "svelte", "dominator"]
|
2021-04-27 17:14:24 +03:00
|
|
|
exclude:
|
|
|
|
- node: "16"
|
|
|
|
manager: "6"
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: install stable
|
|
|
|
uses: actions-rs/toolchain@v1
|
|
|
|
with:
|
|
|
|
toolchain: stable
|
|
|
|
- uses: volta-cli/action@v1
|
|
|
|
with:
|
|
|
|
node-version: ${{ matrix.node }}
|
|
|
|
npm-version: ${{ matrix.manager }}
|
|
|
|
yarn-version: 1.22.5
|
2021-05-05 15:25:17 +03:00
|
|
|
- name: install webkit2gtk
|
2021-05-31 18:53:27 +03:00
|
|
|
if: (github.event.inputs.platform || 'ubuntu') == 'ubuntu'
|
2021-04-27 17:14:24 +03:00
|
|
|
run: |
|
|
|
|
sudo apt-get update
|
2021-05-07 16:58:44 +03:00
|
|
|
sudo apt-get install -y libgtk-3-dev libgtksourceview-3.0-dev webkit2gtk-4.0 libappindicator3-dev
|
2021-05-12 22:25:44 +03:00
|
|
|
- run: yarn
|
|
|
|
working-directory: tooling/cli.js
|
|
|
|
- run: yarn build
|
|
|
|
working-directory: tooling/cli.js
|
|
|
|
- run: yarn
|
|
|
|
working-directory: tooling/api
|
|
|
|
- run: yarn build
|
|
|
|
working-directory: tooling/api
|
2021-04-27 17:14:24 +03:00
|
|
|
- run: yarn
|
|
|
|
working-directory: tooling/create-tauri-app
|
|
|
|
- run: yarn build
|
|
|
|
working-directory: tooling/create-tauri-app
|
|
|
|
- run: yarn test
|
|
|
|
working-directory: tooling/create-tauri-app
|
|
|
|
env:
|
|
|
|
TAURI_RECIPE: ${{ matrix.recipe }}
|
|
|
|
TAURI_RUN_MANAGER: "npm"
|
|
|
|
|
|
|
|
create-recipe-with-yarn:
|
|
|
|
name: "node@${{ matrix.node }} + yarn@1: ${{ matrix.recipe }}"
|
2021-07-14 23:22:10 +03:00
|
|
|
runs-on: ${{ github.event.inputs.platform || 'ubuntu' }}-latest
|
2021-04-27 17:14:24 +03:00
|
|
|
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
node: ["14", "16"]
|
2021-07-29 15:31:04 +03:00
|
|
|
recipe: ["vanillajs", "cra", "vite", "ngcli", "svelte"]
|
2021-04-27 17:14:24 +03:00
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: install stable
|
|
|
|
uses: actions-rs/toolchain@v1
|
|
|
|
with:
|
|
|
|
toolchain: stable
|
|
|
|
- uses: volta-cli/action@v1
|
|
|
|
with:
|
|
|
|
node-version: ${{ matrix.node }}
|
|
|
|
yarn-version: 1.22.5
|
2021-05-05 15:25:17 +03:00
|
|
|
- name: install webkit2gtk
|
2021-07-14 23:22:10 +03:00
|
|
|
if: (github.event.inputs.platform || 'ubuntu') == 'ubuntu'
|
2021-04-27 17:14:24 +03:00
|
|
|
run: |
|
|
|
|
sudo apt-get update
|
2021-05-07 16:58:44 +03:00
|
|
|
sudo apt-get install -y libgtk-3-dev libgtksourceview-3.0-dev webkit2gtk-4.0 libappindicator3-dev
|
2021-04-27 17:14:24 +03:00
|
|
|
- run: yarn
|
|
|
|
working-directory: tooling/create-tauri-app
|
|
|
|
- run: yarn build
|
|
|
|
working-directory: tooling/create-tauri-app
|
|
|
|
- run: yarn test
|
|
|
|
working-directory: tooling/create-tauri-app
|
|
|
|
env:
|
|
|
|
TAURI_RECIPE: ${{ matrix.recipe }}
|
|
|
|
TAURI_RUN_MANAGER: "yarn"
|