Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
101 changes: 31 additions & 70 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,105 +1,66 @@
name: Continuous Integration
# .github/workflows/ci.yml
name: CI

on:
push:
branches: [ "main", "dev" ]
branches: [main]
pull_request:
branches: [ "main", "dev" ]
branches: [main]

jobs:
lint-frontend:
name: Lint Frontend
frontend:
name: Frontend — Lint, Build, Test
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./frontend
working-directory: frontend

steps:
- name: Checkout Repository
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup Node.js
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: "20.x"
cache: "npm"
node-version: '20'
cache: 'npm'
cache-dependency-path: frontend/package-lock.json

- name: Install Dependencies
- name: Install dependencies
run: npm ci

- name: Run ESLint
run: npm run lint
- name: Lint
run: npm run lint --if-present

lint-backend:
name: Lint Backend
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./backend

steps:
- name: Checkout Repository
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "20.x"
cache: "npm"
cache-dependency-path: backend/package-lock.json

- name: Install Dependencies
run: npm ci
- name: Build
run: npm run build

- name: Run ESLint
run: npm run lint
- name: Test
run: npm test --if-present -- --watchAll=false --passWithNoTests

lint-admin:
name: Lint Admin
backend:
name: Backend — Install & Lint
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./admin
working-directory: backend

steps:
- name: Checkout Repository
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup Node.js
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: "20.x"
cache: "npm"
cache-dependency-path: admin/package-lock.json
node-version: '20'
cache: 'npm'
cache-dependency-path: backend/package-lock.json

- name: Install Dependencies
- name: Install dependencies
run: npm ci

- name: Run ESLint
run: npm run lint
- name: Lint
run: npm run lint --if-present

build-frontend:
name: Build Frontend
runs-on: ubuntu-latest
needs: lint-frontend
defaults:
run:
working-directory: ./frontend

steps:
- name: Checkout Repository
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "20.x"
cache: "npm"
cache-dependency-path: frontend/package-lock.json

- name: Install Dependencies
run: npm ci

- name: Build
run: npm run build
- name: Test
run: npm test --if-present -- --passWithNoTests
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
[![Issues](https://img.shields.io/github/issues/Nsanjayboruds/RIVETO)](https://github.com/Nsanjayboruds/RIVETO/issues)
[![Stars](https://img.shields.io/github/stars/Nsanjayboruds/RIVETO)](https://github.com/Nsanjayboruds/RIVETO/stargazers)
[![OpenSSF Best Practices](https://www.bestpractices.dev/projects/11234/badge)](https://www.bestpractices.dev/projects/11234)
[![CI](https://github.com/Nsanjayboruds/RIVETO/actions/workflows/ci.yml/badge.svg)](https://github.com/Nsanjayboruds/RIVETO/actions/workflows/ci.yml)
---
## 📑 Table of Contents

Expand Down
Loading