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