added forgejo runners
This commit is contained in:
parent
0f98bebadd
commit
85a55111cc
3 changed files with 341 additions and 0 deletions
74
.forgejo/workflows/ci-simple.yml
Normal file
74
.forgejo/workflows/ci-simple.yml
Normal file
|
@ -0,0 +1,74 @@
|
|||
name: CI Simple
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ master, develop ]
|
||||
pull_request:
|
||||
branches: [ master, develop ]
|
||||
|
||||
jobs:
|
||||
test-and-build:
|
||||
name: Test and Build
|
||||
runs-on: docker
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: '3.11'
|
||||
|
||||
- name: Set up Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '18'
|
||||
|
||||
- name: Install backend dependencies
|
||||
working-directory: ./backend
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install -r requirements.txt
|
||||
|
||||
- name: Run backend tests
|
||||
working-directory: ./backend
|
||||
run: |
|
||||
python -m pytest -v
|
||||
|
||||
- name: Test backend import
|
||||
working-directory: ./backend
|
||||
run: |
|
||||
python -c "import main; print('Backend imports successfully')"
|
||||
|
||||
- name: Install frontend dependencies
|
||||
working-directory: ./frontend
|
||||
run: npm ci
|
||||
|
||||
- name: Run frontend type check
|
||||
working-directory: ./frontend
|
||||
run: npm run type-check
|
||||
|
||||
- name: Run frontend lint
|
||||
working-directory: ./frontend
|
||||
run: npm run lint
|
||||
|
||||
- name: Build frontend
|
||||
working-directory: ./frontend
|
||||
run: npm run build
|
||||
|
||||
- name: Verify frontend build
|
||||
working-directory: ./frontend
|
||||
run: |
|
||||
if [ ! -d "dist" ]; then
|
||||
echo "Frontend build failed - dist directory not found"
|
||||
exit 1
|
||||
fi
|
||||
echo "Frontend build successful"
|
||||
|
||||
- name: Test Docker builds
|
||||
run: |
|
||||
cd backend && docker build -t tschunkorder-backend-test .
|
||||
cd ../frontend && docker build -t tschunkorder-frontend-test .
|
||||
cd .. && docker-compose build
|
||||
echo "All Docker builds successful"
|
Loading…
Add table
Add a link
Reference in a new issue