55 lines
981 B
YAML
55 lines
981 B
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: [ main, develop ]
|
|
pull_request:
|
|
branches: [ main, develop ]
|
|
|
|
jobs:
|
|
test-backend:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- uses: actions/setup-go@v4
|
|
with:
|
|
go-version: '1.21'
|
|
- name: Run tests
|
|
run: |
|
|
cd backend
|
|
go test ./...
|
|
- name: Build
|
|
run: |
|
|
cd backend
|
|
go build ./...
|
|
|
|
test-frontend:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- uses: actions/setup-node@v3
|
|
with:
|
|
node-version: '20'
|
|
- name: Install dependencies
|
|
run: |
|
|
cd frontend
|
|
npm ci
|
|
- name: Run tests
|
|
run: |
|
|
cd frontend
|
|
npm test
|
|
- name: Build
|
|
run: |
|
|
cd frontend
|
|
npm run build
|
|
|
|
lint:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- name: Run linters
|
|
run: |
|
|
# Add linting commands here
|
|
echo "Linting..."
|
|
|