mirror of
https://github.com/tauri-apps/tauri.git
synced 2026-04-01 10:01:07 +02:00
enable new examples in smoke tests (#194)
* rename smoke tests * split into prod and source runs * rename test job names for clarity * snake case gatsby site * remove airtable api key * add new examples * add new examples to renovate * add scripts to package.json * finish off vanillajs example
This commit is contained in:
committed by
nothingismagick
parent
8df78e29b6
commit
4f9d2e2ba7
76
.github/workflows/smoke-test-prod.yml
vendored
Normal file
76
.github/workflows/smoke-test-prod.yml
vendored
Normal file
@@ -0,0 +1,76 @@
|
||||
name: build smoke tests with prod
|
||||
|
||||
on:
|
||||
release:
|
||||
types: [published]
|
||||
|
||||
jobs:
|
||||
via-prod:
|
||||
runs-on: ${{ matrix.platform }}
|
||||
timeout-minutes: 40
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
platform: [ubuntu-latest, macos-latest, windows-latest]
|
||||
example: [react/gatsby-themed-site, react/create-react-app, react/next.js, vanilla/monolith, vue/quasar-app]
|
||||
include:
|
||||
- platform: ubuntu-latest
|
||||
CARGO_HOME: ~/.cargo
|
||||
- platform: macos-latest
|
||||
CARGO_HOME: ~/.cargo
|
||||
- platform: windows-latest
|
||||
CARGO_HOME: ~/.cargo
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
with:
|
||||
fetch-depth: 3
|
||||
- name: install rust stable
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
toolchain: stable
|
||||
- name: install webkit2gtk (ubuntu only)
|
||||
if: matrix.platform == 'ubuntu-latest'
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y webkit2gtk-4.0
|
||||
- name: cache rust bin
|
||||
id: cache_rust_bin
|
||||
uses: actions/cache@v1
|
||||
with:
|
||||
path: ${{ format('{0}/bin/', matrix.CARGO_HOME) }}
|
||||
key: ${{ runner.OS }}-build-bin-${{ hashFiles('**/Cargo.lock') }}-
|
||||
- name: cache rust registry/index
|
||||
id: cache_rust_reg_index
|
||||
uses: actions/cache@v1
|
||||
with:
|
||||
path: ${{ format('{0}/registry/index/', matrix.CARGO_HOME) }}
|
||||
key: ${{ runner.OS }}-build-reg-index-${{ hashFiles('**/Cargo.lock') }}-
|
||||
- name: cache rust registry/cache
|
||||
id: cache_rust_reg_cache
|
||||
uses: actions/cache@v1
|
||||
with:
|
||||
path: ${{ format('{0}/registry/cache/', matrix.CARGO_HOME) }}
|
||||
key: ${{ runner.OS }}-build-reg-cache-${{ hashFiles('**/Cargo.lock') }}-
|
||||
- run: cargo install tauri-cli --force
|
||||
# if we pull from cache, this will be skipped, but force just in case cache has an issue but it does exist
|
||||
if: steps.cache_rust_bin.outputs.cache-hit != 'true' || steps.cache_rust_reg_index.outputs.cache-hit != 'true' || steps.cache_rust_reg_cache.outputs.cache-hit != 'true'
|
||||
- name: cache node modules
|
||||
uses: actions/cache@v1
|
||||
with:
|
||||
path: ${{ format('examples/{0}/node_modules', matrix.example) }}
|
||||
key: ${{ runner.OS }}-build-${{ hashFiles(format('examples/{0}/yarn.lock', matrix.example)) }}
|
||||
restore-keys: ${{ runner.OS }}-build-${{ env.cache-name }}-
|
||||
- name: install via yarn
|
||||
run: |
|
||||
cd ./examples/${{ matrix.example }}
|
||||
yarn
|
||||
- name: build example
|
||||
run: |
|
||||
cd ./examples/${{ matrix.example }}
|
||||
yarn build
|
||||
- name: yarn tauri build
|
||||
run: |
|
||||
cd ./examples/${{ matrix.example }}
|
||||
yarn tauri:prod:build
|
||||
@@ -1,80 +1,8 @@
|
||||
name: build smoke tests
|
||||
name: build smoke tests with source
|
||||
|
||||
on: pull_request
|
||||
|
||||
jobs:
|
||||
via-prod:
|
||||
runs-on: ${{ matrix.platform }}
|
||||
timeout-minutes: 40
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
platform: [ubuntu-latest, macos-latest, windows-latest]
|
||||
example: [react/gatsby-themed-site, vue/quasar-app]
|
||||
include:
|
||||
- platform: ubuntu-latest
|
||||
CARGO_HOME: ~/.cargo
|
||||
- platform: macos-latest
|
||||
CARGO_HOME: ~/.cargo
|
||||
- platform: windows-latest
|
||||
CARGO_HOME: ~/.cargo
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
with:
|
||||
fetch-depth: 3
|
||||
- name: install rust stable
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
toolchain: stable
|
||||
- name: install webkit2gtk (ubuntu only)
|
||||
if: matrix.platform == 'ubuntu-latest'
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y webkit2gtk-4.0
|
||||
- name: cache rust bin
|
||||
id: cache_rust_bin
|
||||
uses: actions/cache@v1
|
||||
with:
|
||||
path: ${{ format('{0}/bin/', matrix.CARGO_HOME) }}
|
||||
key: ${{ runner.OS }}-build-bin-${{ hashFiles('**/Cargo.lock') }}-
|
||||
- name: cache rust registry/index
|
||||
id: cache_rust_reg_index
|
||||
uses: actions/cache@v1
|
||||
with:
|
||||
path: ${{ format('{0}/registry/index/', matrix.CARGO_HOME) }}
|
||||
key: ${{ runner.OS }}-build-reg-index-${{ hashFiles('**/Cargo.lock') }}-
|
||||
- name: cache rust registry/cache
|
||||
id: cache_rust_reg_cache
|
||||
uses: actions/cache@v1
|
||||
with:
|
||||
path: ${{ format('{0}/registry/cache/', matrix.CARGO_HOME) }}
|
||||
key: ${{ runner.OS }}-build-reg-cache-${{ hashFiles('**/Cargo.lock') }}-
|
||||
- run: cargo install tauri-cli --force
|
||||
# if we pull from cache, this will be skipped, but force just in case cache has an issue but it does exist
|
||||
if: steps.cache_rust_bin.outputs.cache-hit != 'true' || steps.cache_rust_reg_index.outputs.cache-hit != 'true' || steps.cache_rust_reg_cache.outputs.cache-hit != 'true'
|
||||
- name: cache node modules
|
||||
uses: actions/cache@v1
|
||||
with:
|
||||
path: ${{ format('examples/{0}/node_modules', matrix.example) }}
|
||||
key: ${{ runner.OS }}-build-${{ hashFiles(format('examples/{0}/yarn.lock', matrix.example)) }}
|
||||
restore-keys: ${{ runner.OS }}-build-${{ env.cache-name }}-
|
||||
- name: install via yarn
|
||||
run: |
|
||||
cd ./examples/${{ matrix.example }}
|
||||
yarn
|
||||
- name: build example
|
||||
env:
|
||||
EXAMPLE_GATSBY_AIRTABLE_API_KEY: ${{ secrets.EXAMPLE_GATSBY_AIRTABLE_API_KEY }}
|
||||
run: |
|
||||
cd ./examples/${{ matrix.example }}
|
||||
yarn build
|
||||
- name: yarn tauri build
|
||||
run: |
|
||||
cd ./examples/${{ matrix.example }}
|
||||
yarn tauri:prod:build
|
||||
|
||||
via-source:
|
||||
runs-on: ${{ matrix.platform }}
|
||||
timeout-minutes: 40
|
||||
@@ -86,7 +14,16 @@ jobs:
|
||||
example:
|
||||
- name : GatsbyThemedSite
|
||||
folder: react/gatsby-themed-site
|
||||
executable: GatsbyThemedSiteApp
|
||||
executable: gatsby-themed-site-app
|
||||
- name : CRAApp
|
||||
folder: react/create-react-app
|
||||
executable: app
|
||||
- name : NextjsApp
|
||||
folder: react/next.js
|
||||
executable: app
|
||||
- name : VanillajsMonolithApp
|
||||
folder: vanillajs/monolith
|
||||
executable: app
|
||||
- name: quasar-app
|
||||
folder: vue/quasar-app
|
||||
executable: app
|
||||
@@ -153,8 +90,6 @@ jobs:
|
||||
cd ./examples/${{ matrix.example.folder }}
|
||||
yarn
|
||||
- name: build example
|
||||
env:
|
||||
EXAMPLE_GATSBY_AIRTABLE_API_KEY: ${{ secrets.EXAMPLE_GATSBY_AIRTABLE_API_KEY }}
|
||||
run: |
|
||||
cd ./examples/${{ matrix.example.folder }}
|
||||
yarn build
|
||||
6
.github/workflows/test-on-pr.yml
vendored
6
.github/workflows/test-on-pr.yml
vendored
@@ -3,7 +3,7 @@ name: test library
|
||||
on: pull_request
|
||||
|
||||
jobs:
|
||||
build-tauri:
|
||||
build-tauri-core:
|
||||
runs-on: ${{ matrix.platform }}
|
||||
|
||||
strategy:
|
||||
@@ -32,7 +32,7 @@ jobs:
|
||||
TAURI_DIST_DIR: ../../test/fixture/dist
|
||||
TAURI_DIR: ../test/fixture/
|
||||
|
||||
build-tauri-cli:
|
||||
build-tauri-bundler:
|
||||
runs-on: ${{ matrix.platform }}
|
||||
|
||||
strategy:
|
||||
@@ -53,7 +53,7 @@ jobs:
|
||||
cd ./cli/tauri-cli
|
||||
cargo build
|
||||
|
||||
test-tauri-js:
|
||||
test-tauri-js-cli:
|
||||
runs-on: ${{ matrix.platform }}
|
||||
|
||||
strategy:
|
||||
|
||||
Reference in New Issue
Block a user