26.07.2 (#203) #199
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: 'Test' | |
| on: | |
| push: | |
| branches: [ "main" ] | |
| pull_request: | |
| branches: [ "main", "develop" ] | |
| env: | |
| CARGO_TERM_COLOR: always | |
| jobs: | |
| rust-test: | |
| name: 'Run nextest' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| ref: ${{ github.event.pull_request.head.sha }} | |
| - name: 'Install Tauri dependencies' | |
| run: | | |
| sudo apt update && sudo apt install -y \ | |
| libwebkit2gtk-4.1-dev \ | |
| build-essential \ | |
| curl \ | |
| wget \ | |
| file \ | |
| libxdo-dev \ | |
| libssl-dev \ | |
| libayatana-appindicator3-dev \ | |
| librsvg2-dev \ | |
| webkit2gtk-driver \ | |
| xvfb | |
| - name: 'Set up Rust' | |
| uses: actions-rs/toolchain@v1 | |
| with: | |
| toolchain: stable | |
| profile: minimal | |
| override: true | |
| - name: 'Cache Rust dependencies' | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| workspaces: src-tauri | |
| cache-on-failure: true | |
| - name: 'Install nextest' | |
| uses: taiki-e/install-action@nextest | |
| - name: 'Install cargo-llvm-cov' | |
| uses: taiki-e/install-action@cargo-llvm-cov | |
| - name: 'Run tests with coverage' | |
| run: cd src-tauri/ && cargo llvm-cov nextest --profile ci --lcov --output-path ../coverage-rust.lcov | |
| - name: 'Upload TypeScript bindings' | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: typescript-bindings | |
| path: src/lib/api/gen/ | |
| retention-days: 1 | |
| - name: 'Upload Rust coverage to Codecov' | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| files: ./coverage-rust.lcov | |
| flags: rust | |
| name: rust-coverage | |
| svelte-test: | |
| name: 'Run vitest' | |
| runs-on: ubuntu-latest | |
| needs: rust-test | |
| permissions: | |
| # Required to checkout the code | |
| contents: read | |
| # Required to put a comment into the pull-request | |
| pull-requests: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: 'Download TypeScript bindings' | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: typescript-bindings | |
| path: src/lib/api/gen/ | |
| - name: 'Install Node' | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20.x' | |
| cache: 'npm' | |
| - name: 'Install Deps' | |
| run: npm ci | |
| - name: 'Test' | |
| run: npm run test:ci | |
| - name: 'Upload Svelte coverage to Codecov' | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| files: ./coverage/coverage-final.json | |
| flags: svelte | |
| name: svelte-coverage |