Update README.md #1
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: CI | |
| on: | |
| push: | |
| branches: ['**'] | |
| pull_request: | |
| branches: ['**'] | |
| concurrency: | |
| group: ci-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| node: | |
| name: Node (Svelte) - format & lint | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| cache: npm | |
| - run: npm ci | |
| - run: npm run format | |
| - run: npm run lint | |
| - name: Fail if formatting changed files | |
| run: | | |
| if ! git diff --quiet; then | |
| echo "Formatter changed files. Please commit the updates." | |
| git status --porcelain | |
| exit 1 | |
| fi | |
| rust: | |
| name: Rust - fmt, clippy & unit testing | |
| env: | |
| CARGO_TERM_COLOR: always | |
| CARGO_INCREMENTAL: 0 # Disable incremental compilation for faster from-scratch builds | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: src-tauri | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Linux system deps | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y \ | |
| pkg-config build-essential \ | |
| libgtk-3-dev \ | |
| libayatana-appindicator3-dev \ | |
| librsvg2-dev \ | |
| libglib2.0-dev | |
| sudo apt-get install -y libwebkit2gtk-4.1-dev || sudo apt-get install -y libwebkit2gtk-4.0-dev | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: rustfmt, clippy | |
| - uses: Swatinem/rust-cache@v2 | |
| with: | |
| workspaces: './src-tauri -> target' | |
| - name: Run rustfmt | |
| run: cargo fmt --all -- --check | |
| - name: Run clippy | |
| run: cargo clippy --all-targets --all-features -- -D warnings | |
| - uses: ikalnytskyi/action-setup-postgres@v8 | |
| id: postgres | |
| - name: Run unit tests | |
| run: cargo test --locked |