Files
tauri/.github/workflows/test-cta.yml
Jacob Bolda af6411d5f8 feat: setup testing for CTA (#1615)
* feat: setup testing for CTA

* install with yarn

* build before test

* add yarn to npm runs for install / test start

* add dev mode to link cli.js and api locally

* remove fixtures

* run tests serially

* cli.js build-release avoids webpack error

* assert on package.json contents as first check

* run tauri build and split out custom asserts

* add changefile

* shorten workflow name

* too short

* exclude npm@6 on node@16

* increase timeout, tauri build takes a bit of time

* only assert that the tauri script exists
2021-04-27 09:14:24 -05:00

98 lines
2.7 KiB
YAML

# 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:
branch:
default: "dev"
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 }}"
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
node: ["14", "16"]
manager: ["6", "7"]
recipe: ["vanillajs", "reactjs", "reactts", "vite", "vuecli"]
exclude:
- node: "16"
manager: "6"
steps:
- uses: actions/checkout@v2
with:
ref: ${{ github.head_ref || github.event.inputs.branch }}
- 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
- name: install webkit2gtk (ubuntu only)
if: matrix.platform == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install -y webkit2gtk-4.0
- 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 }}"
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
node: ["14", "16"]
recipe: ["vanillajs", "reactjs", "reactts", "vite", "vuecli"]
steps:
- uses: actions/checkout@v2
with:
ref: ${{ github.head_ref || github.event.inputs.branch }}
- 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
- name: install webkit2gtk (ubuntu only)
if: matrix.platform == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install -y webkit2gtk-4.0
- 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"