73 lines
1.8 KiB
YAML
73 lines
1.8 KiB
YAML
name: Dev Build
|
|
|
|
on:
|
|
pull_request:
|
|
branches: [dev]
|
|
push:
|
|
branches: [dev]
|
|
|
|
jobs:
|
|
build-test:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Setup .NET
|
|
uses: actions/setup-dotnet@v4
|
|
with:
|
|
dotnet-version: '9.0.x'
|
|
|
|
- name: Restore backend
|
|
run: dotnet restore
|
|
working-directory: ./backend
|
|
|
|
- name: Build backend
|
|
run: dotnet build --no-restore --configuration Release
|
|
working-directory: ./backend
|
|
|
|
- name: Test backend
|
|
run: dotnet test --no-build --configuration Release
|
|
working-directory: ./backend
|
|
|
|
- name: Setup Node
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: "24"
|
|
|
|
- name: Install frontend deps
|
|
run: npm ci
|
|
working-directory: ./frontend
|
|
|
|
- name: Build frontend
|
|
run: npm run build
|
|
working-directory: ./frontend
|
|
|
|
- name: Build API client
|
|
run: |
|
|
npm install
|
|
npm run build --if-present
|
|
working-directory: ./api-client
|
|
|
|
notify-success:
|
|
needs: build-test
|
|
if: success() && gitea.event_name == 'push'
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Notify Slack success
|
|
run: |
|
|
curl -X POST -H 'Content-type: application/json' \
|
|
--data "{\"text\":\"✅ Control-Center dev built successfully.\"}" \
|
|
"${{ secrets.SLACK_WEBHOOK_URL }}"
|
|
|
|
notify-failure:
|
|
needs: build-test
|
|
if: failure()
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Notify Slack failure
|
|
run: |
|
|
curl -X POST -H 'Content-type: application/json' \
|
|
--data "{\"text\":\"🚨 Control-Center dev pipeline failed. Check Gitea Actions for details.\"}" \
|
|
"${{ secrets.SLACK_WEBHOOK_URL }}"
|