spacedrive/.github/workflows/ci.yml
Ericson "Fogo" Soares 5d49c8a74a
[ENG-823] Fixing bad handling of dots in directory name (#1051)
* Fixing bad handling of dots in directory name

* fix ci not running on rust

---------

Co-authored-by: Utku Bakir <74243531+utkubakir@users.noreply.github.com>
2023-06-28 21:41:55 +00:00

115 lines
2.7 KiB
YAML

name: CI
on:
pull_request:
merge_group:
env:
SPACEDRIVE_CUSTOM_APT_FLAGS: --no-install-recommends
# Cancel previous runs of the same workflow on the same branch.
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
typescript:
name: TypeScript
runs-on: ubuntu-20.04
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup Node.js, pnpm and dependencies
uses: ./.github/actions/setup-pnpm
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Perform typechecks
run: pnpm typecheck
eslint:
name: ESLint
runs-on: ubuntu-20.04
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup Node.js, pnpm and dependencies
uses: ./.github/actions/setup-pnpm
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Perform linting
run: pnpm lint
rustfmt:
name: Rust Formatting
runs-on: ubuntu-20.04
steps:
- name: Checkout repository
uses: actions/checkout@v3
- uses: dorny/paths-filter@v2
id: filter
with:
filters: |
changes:
- 'core/**'
- 'crates/*/**'
- name: Setup Rust and Prisma
if: steps.filter.outputs.changes == 'true'
uses: ./.github/actions/setup-rust
- name: Run rustfmt
if: steps.filter.outputs.changes == 'true'
run: cargo fmt --all -- --check
clippy:
name: Clippy (${{ matrix.platform }})
runs-on: ${{ matrix.platform }}
strategy:
matrix:
platform: [ubuntu-20.04, macos-latest, windows-latest]
steps:
- name: Checkout repository
uses: actions/checkout@v3
- uses: dorny/paths-filter@v2
id: filter
with:
filters: |
changes:
- 'core/**'
- 'crates/*/**'
- name: Setup System and Rust
if: steps.filter.outputs.changes == 'true'
uses: ./.github/actions/setup-system
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Run Clippy
if: steps.filter.outputs.changes == 'true'
uses: actions-rs/clippy-check@v1
with:
args: --workspace --all-features
token: ${{ secrets.GITHUB_TOKEN }}
# test:
# name: Test (${{ matrix.platform }})
# runs-on: ${{ matrix.platform }}
# strategy:
# matrix:
# platform: [ubuntu-20.04, macos-latest, windows-latest]
# steps:
# - name: Checkout repository
# uses: actions/checkout@v3
#
# - name: Setup
# uses: ./.github/actions/setup
#
# - name: Test
# run: cargo test --workspace --all-features