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/**' - '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