Files
spacedrive/.github/workflows/ci.yml
Utku 15370a5b21 Roadmap (#692)
* update roadmap

* add android & ios to footer

* Limit CI to run only when needed

* fix paths-ignore syntax

* update key manager description
2023-04-12 02:36:16 +00:00

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