feat(ci): Add Forgejo CI/CD pipeline for linting and building
- Automated linting with rustfmt and clippy - Automated building and testing - Automated Docker image builds - Clippy and rustfmt configuration files
This commit is contained in:
parent
c69d3be302
commit
775f05d696
4 changed files with 238 additions and 0 deletions
73
FORGEJO-CI-CD-PIPELINE.md
Normal file
73
FORGEJO-CI-CD-PIPELINE.md
Normal file
|
|
@ -0,0 +1,73 @@
|
|||
# Forgejo CI/CD Pipeline
|
||||
|
||||
## Status: ✅ Implemented
|
||||
|
||||
**Date**: 2026-02-15 19:55:00 UTC
|
||||
|
||||
---
|
||||
|
||||
## Pipeline Stages
|
||||
|
||||
### 1. Lint Job
|
||||
- Check code formatting with rustfmt
|
||||
- Run clippy linter with strict rules
|
||||
|
||||
### 2. Build Job
|
||||
- Build all targets with cargo
|
||||
- Run all tests
|
||||
|
||||
### 3. Docker Build Job
|
||||
- Build production Docker image
|
||||
- Build development Docker image
|
||||
|
||||
---
|
||||
|
||||
## Trigger Events
|
||||
|
||||
- Push to main branch
|
||||
- Push to develop branch
|
||||
- Pull requests to main/develop
|
||||
|
||||
---
|
||||
|
||||
## Configuration Files
|
||||
|
||||
- .forgejo/workflows/lint-and-build.yml
|
||||
- backend/clippy.toml
|
||||
- backend/rustfmt.toml
|
||||
|
||||
---
|
||||
|
||||
## Running Locally
|
||||
|
||||
### Check formatting
|
||||
```bash
|
||||
cd backend
|
||||
cargo fmt --all -- --check
|
||||
cargo fmt --all # to fix
|
||||
```
|
||||
|
||||
### Run clippy
|
||||
```bash
|
||||
cd backend
|
||||
cargo clippy --all-targets --all-features -- -D warnings
|
||||
```
|
||||
|
||||
### Build
|
||||
```bash
|
||||
cd backend
|
||||
cargo build --verbose
|
||||
```
|
||||
|
||||
### Run tests
|
||||
```bash
|
||||
cd backend
|
||||
cargo test --verbose
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Viewing Results
|
||||
|
||||
After pushing, go to:
|
||||
http://gitea.soliverez.com.ar/alvaro/normogen/actions
|
||||
Loading…
Add table
Add a link
Reference in a new issue