Skip to content

Commit

Permalink
split workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
ciscorn committed Dec 7, 2023
1 parent e6baa7d commit 8dc0488
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 6 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build
name: Build Tauri App

on:
push:
Expand Down Expand Up @@ -31,4 +31,4 @@ jobs:
- name: Make Tauri build destination
run: mkdir -p app/build
- name: Build
run: cargo build --verbose --workspace
run: cargo build --verbose --package app
2 changes: 1 addition & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
strategy:
fail-fast: false
matrix:
platform: [macos-latest, windows-latest]
platform: [macos-latest, windows-latest]
runs-on: ${{ matrix.platform }}

steps:
Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/test.yml → .github/workflows/test_app.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Test
name: Test Tauri App

on:
push:
Expand All @@ -7,6 +7,8 @@ on:
tags:
- "*"
pull_request:
paths:
- "app/**"

env:
CARGO_TERM_COLOR: always
Expand All @@ -23,7 +25,7 @@ jobs:
run: rustup toolchain install stable --profile minimal
- name: Rust Cache
uses: Swatinem/rust-cache@v2
- name: install dependencies
- name: Install dependencies
# if: matrix.platform == 'ubuntu-20.04'
run: |
sudo apt-get update
Expand All @@ -33,7 +35,7 @@ jobs:
- name: Make Tauri build destination
run: mkdir -p app/build
- name: Test
run: cargo llvm-cov --workspace --lcov --output-path lcov.info --all-features
run: cargo llvm-cov --package app --lcov --output-path lcov.info --all-features
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
env:
Expand Down
43 changes: 43 additions & 0 deletions .github/workflows/test_libs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Test Libraries

on:
push:
branches:
- main
tags:
- "*"
pull_request:
paths:
- "nusamai/**"
- "nusamai-*/**"

env:
CARGO_TERM_COLOR: always

permissions:
contents: read

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Rustup
run: rustup toolchain install stable --profile minimal
- name: Rust Cache
uses: Swatinem/rust-cache@v2
- name: Install dependencies
run: |
sudo apt-get update
sudo apt install -y libwebkit2gtk-4.0-dev libgtk-3-dev libayatana-appindicator3-dev librsvg2-dev
- name: Install cargo-llvm-cov
uses: taiki-e/install-action@cargo-llvm-cov
- name: Test
run: cargo llvm-cov --workspace --exclude app --lcov --output-path lcov.info --all-features
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
files: lcov.info
fail_ci_if_error: false

0 comments on commit 8dc0488

Please sign in to comment.