Files
archived-smoke-tests/.github/workflows/build-node-smoke-tests.yml
2021-05-03 15:26:00 -03:00

105 lines
3.6 KiB
YAML

name: build node smoke-tests from source
on: workflow_dispatch
jobs:
node:
runs-on: ${{ matrix.platform }}
timeout-minutes: 40
strategy:
fail-fast: false
matrix:
platform: [ubuntu-latest, macos-latest, windows-latest]
test:
- name: GatsbyThemedSite
folder: react/gatsby-themed-site
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
- name: svelte-app
folder: svelte/svelte-app
executable: app
include:
- platform: ubuntu-latest
CARGO_HOME: ~/.cargo
releaseFolder: target/release/bundle/deb
ext: _0.1.0_amd64.deb
- platform: macos-latest
CARGO_HOME: ~/.cargo
releaseFolder: target/release/bundle/macos
ext: .app
- platform: windows-latest
CARGO_HOME: ~/.cargo
releaseFolder: target/release/bundle/msi
ext: _0.1.0_x64.msi
steps:
- name: checkout tauri
uses: actions/checkout@v2
with:
repository: tauri-apps/tauri
ref: dev
- name: checkout smoke-tests
uses: actions/checkout@v2
with:
path: smoke-tests
- name: install rust stable
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
- 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
uses: actions/cache@v1
with:
path: ${{ format('{0}/bin/', matrix.CARGO_HOME) }}
key: ${{ runner.OS }}-build-bin-${{ hashFiles('**/Cargo.toml') }}-
- name: cache rust registry/index
uses: actions/cache@v1
with:
path: ${{ format('{0}/registry/index/', matrix.CARGO_HOME) }}
key: ${{ runner.OS }}-build-reg-index-${{ hashFiles('**/Cargo.toml') }}-
- name: cache rust registry/cache
uses: actions/cache@v1
with:
path: ${{ format('{0}/registry/cache/', matrix.CARGO_HOME) }}
key: ${{ runner.OS }}-build-reg-cache-${{ hashFiles('**/Cargo.toml') }}-
- name: install cli deps via yarn
working-directory: ./tooling/cli.js
run: yarn
- name: build cli
working-directory: ./tooling/cli.js
run: yarn build
- name: cache node modules
uses: actions/cache@v1
with:
path: ${{ format('smoke-tests/node/{0}/node_modules', matrix.test.folder) }}
key: ${{ runner.OS }}-build-${{ hashFiles(format('smoke-tests/node/{0}/yarn.lock', matrix.test.folder)) }}
restore-keys: ${{ runner.OS }}-build-${{ env.cache-name }}-
- name: install via yarn
working-directory: ./smoke-tests/node/${{ matrix.test.folder }}
run: yarn
- name: yarn tauri build
working-directory: ./smoke-tests/node/${{ matrix.test.folder }}
run: yarn tauri:build
- uses: actions/upload-artifact@v1
if: success()
with:
name: ${{ matrix.test.name }}(${{ matrix.platform }})
path: ${{ format('./smoke-tests/node/{0}/src-tauri/{1}/{2}{3}', matrix.test.folder, matrix.releaseFolder, matrix.test.executable, matrix.ext ) }}