Skip to content

Commit d40c0b8

Browse files
committed
upd workflow
1 parent 316df5f commit d40c0b8

2 files changed

Lines changed: 53 additions & 20 deletions

File tree

.github/workflows/ci.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: Rust + Frontend Build
2+
3+
on:
4+
push:
5+
branches: [ "master" ]
6+
pull_request:
7+
branches: [ "master" ]
8+
9+
env:
10+
CARGO_TERM_COLOR: always
11+
NODE_VERSION: 20
12+
13+
jobs:
14+
build:
15+
16+
runs-on: ubuntu-latest
17+
18+
steps:
19+
- name: Checkout repository
20+
uses: actions/checkout@v4
21+
22+
# Rust setup
23+
- name: Set up Rust
24+
uses: actions/setup-rust@v2
25+
with:
26+
rust-version: stable
27+
28+
- name: Build Rust backend
29+
run: cargo build --verbose
30+
working-directory: ./backend
31+
32+
# Node.js setup
33+
- name: Set up Node.js
34+
uses: actions/setup-node@v3
35+
with:
36+
node-version: ${{ env.NODE_VERSION }}
37+
cache: "npm"
38+
39+
- name: Install frontend dependencies
40+
run: npm ci
41+
working-directory: ./frontend
42+
43+
- name: Build frontend
44+
run: npm run build
45+
working-directory: ./frontend
46+
47+
# Optionally run tests
48+
# - name: Run Rust tests
49+
# run: cargo test --verbose
50+
51+
# - name: Run frontend tests (if any)
52+
# run: npm test
53+
# working-directory: ./frontend

.github/workflows/rust.yml

Lines changed: 0 additions & 20 deletions
This file was deleted.

0 commit comments

Comments
 (0)