mirror of
https://github.com/spacedriveapp/spacedrive.git
synced 2026-04-20 06:28:14 -04:00
* update roadmap * add android & ios to footer * Limit CI to run only when needed * fix paths-ignore syntax * update key manager description
127 lines
2.8 KiB
YAML
127 lines
2.8 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
pull_request:
|
|
paths-ignore:
|
|
- 'docs/**'
|
|
- '.cspell/**'
|
|
- '.vscode/**'
|
|
workflow_dispatch:
|
|
|
|
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-latest
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Install pnpm
|
|
uses: pnpm/action-setup@v2.2.2
|
|
with:
|
|
version: 7.x.x
|
|
|
|
- name: Install Node.js
|
|
uses: actions/setup-node@v3
|
|
with:
|
|
node-version: 18
|
|
cache: 'pnpm'
|
|
|
|
- name: Install pnpm dependencies
|
|
run: pnpm i --frozen-lockfile
|
|
|
|
- name: Perform typechecks
|
|
run: pnpm typecheck
|
|
|
|
eslint:
|
|
name: ESLint
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Install pnpm
|
|
uses: pnpm/action-setup@v2.2.2
|
|
with:
|
|
version: 7.x.x
|
|
|
|
- name: Install Node.js
|
|
uses: actions/setup-node@v3
|
|
with:
|
|
node-version: 18
|
|
cache: 'pnpm'
|
|
|
|
- name: Install pnpm dependencies
|
|
run: pnpm i --frozen-lockfile
|
|
|
|
- name: Perform linting
|
|
run: pnpm lint
|
|
|
|
rustfmt:
|
|
name: Rust Formatting
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Install Rust
|
|
uses: actions-rs/toolchain@v1
|
|
with:
|
|
toolchain: stable
|
|
components: rustfmt
|
|
|
|
- name: Cache Rust deps
|
|
uses: Swatinem/rust-cache@v2
|
|
|
|
- name: Generate Prisma client
|
|
uses: ./.github/actions/generate-prisma-client
|
|
|
|
- name: Run rustfmt
|
|
run: cargo fmt --all -- --check
|
|
|
|
clippy:
|
|
name: Clippy (${{ matrix.platform }})
|
|
runs-on: ${{ matrix.platform }}
|
|
strategy:
|
|
matrix:
|
|
platform: [ubuntu-latest, macos-latest, windows-latest]
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Setup
|
|
uses: ./.github/actions/setup
|
|
|
|
- name: Run Clippy
|
|
uses: actions-rs/clippy-check@v1
|
|
with:
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
args: --workspace --all-features
|
|
|
|
# test:
|
|
# name: Test (${{ matrix.platform }})
|
|
# runs-on: ${{ matrix.platform }}
|
|
# strategy:
|
|
# matrix:
|
|
# platform: [ubuntu-latest, 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
|