tauri/.github/workflows/test-on-pr.yml
Ty Tracey b114fb8c38 Adding Clippy/Rust Fmt to the pr workflow #333 (#367)
* Added clippy configuration file, added github action to run clippy, and changed line endings for rust fmt

* fix(cippliy-check-action) install webkit2gtk

* fix(clippy_check) add env variables

* refactor(tauri) fix clippy checks

* chore(tauri) use tauri_includedir_codegen v0.5.2

* fix(tests) dir tests

Co-authored-by: Lucas Fernandes Nogueira <lucasfernandesnog@gmail.com>
2020-02-08 14:18:09 -03:00

90 lines
2.1 KiB
YAML

name: test library
on: pull_request
jobs:
clippy_check:
runs-on: ubuntu-latest
env:
TAURI_DIST_DIR: tauri/test/fixture/dist
TAURI_DIR: ../test/fixture/src-tauri
steps:
- uses: actions/checkout@v2
- name: install webkit2gtk
run: |
sudo apt-get update
sudo apt-get install -y webkit2gtk-4.0
- run: rustup component add clippy
- uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
build-tauri-core:
runs-on: ${{ matrix.platform }}
strategy:
fail-fast: false
matrix:
platform: [ubuntu-latest, macos-latest, windows-latest]
steps:
- uses: actions/checkout@v2
- name: install 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: build
run: |
cd ./tauri
cargo build
env:
TAURI_DIST_DIR: ../../test/fixture/dist
TAURI_DIR: ../test/fixture/src-tauri
- name: test
run: |
cargo test
env:
TAURI_DIST_DIR: ../../test/fixture/dist
TAURI_DIR: ../test/fixture/src-tauri
build-tauri-bundler:
runs-on: ${{ matrix.platform }}
strategy:
fail-fast: false
matrix:
platform: [ubuntu-latest, macos-latest, windows-latest]
steps:
- uses: actions/checkout@v2
- name: install stable
uses: actions-rs/toolchain@v1
with:
toolchain: stable
- name: build
run: |
cd ./cli/tauri-bundler
cargo build
test-tauri-js-cli:
runs-on: ${{ matrix.platform }}
strategy:
fail-fast: false
matrix:
platform: [ubuntu-latest, macos-latest, windows-latest]
steps:
- uses: actions/checkout@v2
- name: test
timeout-minutes: 15
run: |
cd ./cli/tauri.js
yarn
yarn test