mirror of
https://github.com/gitbutlerapp/gitbutler.git
synced 2024-12-21 08:31:40 +03:00
89 lines
2.6 KiB
YAML
89 lines
2.6 KiB
YAML
name: "Test"
|
|
on: [push]
|
|
|
|
jobs:
|
|
changes:
|
|
runs-on: ubuntu-latest
|
|
outputs:
|
|
rust: ${{ steps.filter.outputs.rust }}
|
|
node: ${{ steps.filter.outputs.node }}
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: dorny/paths-filter@v2
|
|
id: filter
|
|
with:
|
|
filters: |
|
|
rust:
|
|
- 'gitbutler-app/**'
|
|
- 'gitbutler-core/**'
|
|
- 'gitbutler-git/**'
|
|
- 'gitbutler-diff/**'
|
|
- 'Cargo.lock'
|
|
- 'Cargo.toml'
|
|
- 'rust-toolchain.toml'
|
|
node:
|
|
- 'gitbutler-ui/**'
|
|
- 'package.json'
|
|
- 'pnpm-lock.yaml'
|
|
|
|
lint-node:
|
|
needs: changes
|
|
if: ${{ needs.changes.outputs.node == 'true' }}
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: ./.github/actions/init-env-node
|
|
- run: pnpm lint
|
|
|
|
check-node:
|
|
needs: changes
|
|
if: ${{ needs.changes.outputs.node == 'true' }}
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: ./.github/actions/init-env-node
|
|
- run: pnpm check
|
|
|
|
unittest-node:
|
|
needs: changes
|
|
if: ${{ needs.changes.outputs.node == 'true' }}
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: ./.github/actions/init-env-node
|
|
- run: pnpm test
|
|
|
|
lint-rust:
|
|
needs: changes
|
|
if: ${{ needs.changes.outputs.rust == 'true' }}
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: ./.github/actions/init-env-rust
|
|
- run: cargo fmt --check
|
|
|
|
test-rust:
|
|
needs: changes
|
|
if: ${{ needs.changes.outputs.rust == 'true' }}
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: ./.github/actions/init-env-rust
|
|
- run: cargo test --locked
|
|
|
|
check-rust:
|
|
needs: changes
|
|
if: ${{ needs.changes.outputs.rust == 'true' }}
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: ./.github/actions/init-env-rust
|
|
- run: cargo clippy -p gitbutler-git --all-targets --all-features --tests
|
|
- run: cargo clippy -p gitbutler-git --tests
|
|
- run: cargo clippy -p gitbutler-git --no-default-features
|
|
- run: cargo clippy -p gitbutler-git --no-default-features --tests
|
|
- run: cargo clippy -p gitbutler-git --no-default-features --features git2
|
|
- run: cargo clippy -p gitbutler-git --no-default-features --features git2 --tests
|
|
- run: cargo clippy -p gitbutler-git --no-default-features --features cli
|
|
- run: cargo clippy -p gitbutler-git --no-default-features --features cli --tests
|