mirror of
https://github.com/gitbutlerapp/gitbutler.git
synced 2024-12-02 07:53:55 +03:00
83 lines
2.1 KiB
YAML
83 lines
2.1 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 --all-targets --all-features --tests
|
|
- run: cargo clippy --no-default-features --tests -p gitbutler-git
|