setup frontend #5
67
.github/workflows/test.yml
vendored
67
.github/workflows/test.yml
vendored
@@ -44,6 +44,7 @@ jobs:
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
test:
|
test:
|
||||||
|
needs: frontend-build
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
@@ -54,9 +55,42 @@ jobs:
|
|||||||
- name: Setup Rust, checkout and restore caches
|
- name: Setup Rust, checkout and restore caches
|
||||||
uses: ./.github/actions/setup-rust
|
uses: ./.github/actions/setup-rust
|
||||||
|
|
||||||
|
- name: Download frontend build
|
||||||
|
uses: actions/download-artifact@v4
|
||||||
|
with:
|
||||||
|
name: frontend-build
|
||||||
|
path: apps/frontend/build
|
||||||
|
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
run: cargo test --all-features
|
run: cargo test --all-features
|
||||||
|
|
||||||
|
lint:
|
||||||
|
needs: frontend-build
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- name: Setup Rust, checkout and restore caches
|
||||||
|
uses: ./.github/actions/setup-rust
|
||||||
|
with:
|
||||||
|
components: clippy, rustfmt
|
||||||
|
|
||||||
|
- name: Download frontend build
|
||||||
|
uses: actions/download-artifact@v4
|
||||||
|
with:
|
||||||
|
name: frontend-build
|
||||||
|
path: apps/frontend/build
|
||||||
|
|
||||||
|
- name: Run clippy
|
||||||
|
run: cargo clippy --all-features -- -D warnings
|
||||||
|
|
||||||
|
- name: Check code formatting
|
||||||
|
run: cargo fmt --all -- --check
|
||||||
|
|
||||||
|
|
||||||
test-frontend:
|
test-frontend:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
@@ -88,21 +122,36 @@ jobs:
|
|||||||
cd apps/frontend
|
cd apps/frontend
|
||||||
pnpm test
|
pnpm test
|
||||||
|
|
||||||
lint:
|
frontend-build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- uses: pnpm/action-setup@v4
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
version: 10
|
||||||
|
run_install: false
|
||||||
|
|
||||||
- name: Setup Rust, checkout and restore caches
|
- name: Setup Node.js
|
||||||
uses: ./.github/actions/setup-rust
|
uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
components: clippy, rustfmt
|
node-version: 22
|
||||||
|
cache: 'pnpm'
|
||||||
|
cache-dependency-path: apps/frontend/pnpm-lock.yaml
|
||||||
|
|
||||||
- name: Run clippy
|
- name: Install frontend dependencies
|
||||||
run: cargo clippy --all-features -- -D warnings
|
run: |
|
||||||
|
cd apps/frontend
|
||||||
|
pnpm install
|
||||||
|
|
||||||
- name: Check code formatting
|
- name: Build frontend
|
||||||
run: cargo fmt --all -- --check
|
run: |
|
||||||
|
cd apps/frontend
|
||||||
|
pnpm build
|
||||||
|
|
||||||
|
- name: Upload frontend build artifact
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: frontend-build
|
||||||
|
path: apps/frontend/build
|
||||||
Reference in New Issue
Block a user