mirror of
https://github.com/spacedriveapp/spacedrive.git
synced 2026-05-05 05:46:24 -04:00
* make it work * use functions instead of jobs for shallow stuff * use generalised AbortOnDrop * simplify naming * error stuff + alphabetical rspc types * log errors * don't run CI on push * remove ephemeral * private Worker::new * remove comments
109 lines
2.5 KiB
YAML
109 lines
2.5 KiB
YAML
name: CI
|
|
|
|
on:
|
|
pull_request:
|
|
paths-ignore:
|
|
- '**.md'
|
|
- 'docs/**'
|
|
- 'LICENSE'
|
|
- '.cspell/**'
|
|
- '.vscode/**'
|
|
- '.github/CODEOWNERS'
|
|
- '.github/FUNDING.yml'
|
|
- '.github/ISSUE_TEMPLATE/**'
|
|
- '.github/scripts/osxcross/**'
|
|
- '.github/scripts/ffmpeg-macos/**'
|
|
- '.gitattributes'
|
|
- 'cspell.config.yaml'
|
|
workflow_dispatch:
|
|
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
|
|
|
|
- name: Setup Rust and Prisma
|
|
uses: ./.github/actions/setup-rust
|
|
|
|
- name: Run rustfmt
|
|
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
|
|
|
|
- name: Setup System and Rust
|
|
uses: ./.github/actions/setup-system
|
|
with:
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: Run Clippy
|
|
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
|