openvibers/source.openvibe.games Commits

Add GitHub Actions CI/CD pipeline and templates

CO Copilot committed 28 Jun 2026 · 9eb53f9fcf · 4 files, +220 −0

- Automated backend tests with PostgreSQL
- Launcher build verification
- Docker image build and push on releases
- Security scanning (secrets, dependencies)
- Bug report and PR templates
- Automatic release creation from git tags

Co-authored-by: Copilot <[email protected]>

Changes

ddiff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md
nnew file mode 100644
iindex 0000000..3722f57
---- /dev/null
++++ b/.github/ISSUE_TEMPLATE/bug_report.md
@@@ -0,0 +1,35 @@
++---
++name: Bug Report
++about: Report a bug or issue
++title: "[BUG] "
++labels: ['bug']
++assignees: ''
++
++---
++
++## Description
++A clear and concise description of what the bug is.
++
++## Steps to Reproduce
++1. Go to '...'
++2. Click on '....'
++3. See error
++
++## Expected Behavior
++A clear and concise description of what you expected to happen.
++
++## Actual Behavior
++What actually happened instead.
++
++## Environment
++- OS: [e.g. Linux]
++- Game Version: [e.g. v1.0.0]
++- Node.js: [e.g. 18.x]
++
++## Logs
++```
++Paste relevant logs here
++```
++
++## Screenshots
++If applicable, add screenshots to help explain your problem.
ddiff --git a/.github/pull_request_template.md b/.github/pull_request_template.md
nnew file mode 100644
iindex 0000000..e017346
---- /dev/null
++++ b/.github/pull_request_template.md
@@@ -0,0 +1,22 @@
++## Description
++Please include a summary of the changes and why they were made.
++
++Fixes #(issue)
++
++## Type of change
++- [ ] Bug fix (non-breaking change that fixes an issue)
++- [ ] New feature (non-breaking change that adds functionality)
++- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
++- [ ] Documentation update
++
++## How Has This Been Tested?
++Describe the tests you ran and how to reproduce them.
++
++## Checklist
++- [ ] My code follows the style guidelines
++- [ ] I have performed a self-review of my own code
++- [ ] I have commented my code, particularly in hard-to-understand areas
++- [ ] I have made corresponding changes to the documentation
++- [ ] My changes generate no new warnings
++- [ ] I have added tests that prove my fix is effective or that my feature works
++- [ ] New and existing unit tests passed locally with my changes
ddiff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml
nnew file mode 100644
iindex 0000000..06684f5
---- /dev/null
++++ b/.github/workflows/ci-cd.yml
@@@ -0,0 +1,126 @@
++name: CI/CD Pipeline
++
++on:
++ push:
++ branches: [ main ]
++ tags: [ v*.*.* ]
++ pull_request:
++ branches: [ main ]
++
++jobs:
++ # Backend tests and build
++ backend:
++ runs-on: ubuntu-latest
++ services:
++ postgres:
++ image: postgres:15
++ env:
++ POSTGRES_PASSWORD: postgres
++ POSTGRES_DB: openvibe_test
++ options: >-
++ --health-cmd pg_isready
++ --health-interval 10s
++ --health-timeout 5s
++ --health-retries 5
++ ports:
++ - 5432:5432
++
++ steps:
++ - uses: actions/checkout@v3
++
++ - name: Setup Node.js
++ uses: actions/setup-node@v3
++ with:
++ node-version: '18'
++ cache: 'npm'
++ cache-dependency-path: backend/package-lock.json
++
++ - name: Install dependencies
++ working-directory: backend
++ run: npm ci
++
++ - name: Run linter
++ working-directory: backend
++ run: npm run lint --if-present || true
++
++ - name: Build
++ working-directory: backend
++ run: npm run build
++
++ - name: Run tests
++ working-directory: backend
++ env:
++ DATABASE_URL: postgresql://postgres:postgres@localhost:5432/openvibe_test
++ run: npm test
++
++ # Launcher (Electron) build
++ launcher:
++ runs-on: ubuntu-latest
++ steps:
++ - uses: actions/checkout@v3
++
++ - name: Setup Node.js
++ uses: actions/setup-node@v3
++ with:
++ node-version: '18'
++ cache: 'npm'
++ cache-dependency-path: launcher/package-lock.json
++
++ - name: Install dependencies
++ working-directory: launcher
++ run: npm ci
++
++ - name: Run linter
++ working-directory: launcher
++ run: npm run lint --if-present || true
++
++ # Docker build (on tags)
++ docker:
++ needs: [ backend, launcher ]
++ runs-on: ubuntu-latest
++ if: startsWith(github.ref, 'refs/tags/v')
++
++ steps:
++ - uses: actions/checkout@v3
++
++ - name: Set up Docker Buildx
++ uses: docker/setup-buildx-action@v2
++
++ - name: Login to GitHub Container Registry
++ uses: docker/login-action@v2
++ with:
++ registry: ghcr.io
++ username: ${{ github.actor }}
++ password: ${{ secrets.GITHUB_TOKEN }}
++
++ - name: Extract version
++ id: version
++ run: echo "tag=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
++
++ - name: Build and push backend
++ uses: docker/build-push-action@v4
++ with:
++ context: ./backend
++ push: true
++ tags: |
++ ghcr.io/${{ github.repository }}/api:${{ steps.version.outputs.tag }}
++ ghcr.io/${{ github.repository }}/api:latest
++
++ # Release creation (on tags)
++ release:
++ needs: [ backend, launcher ]
++ runs-on: ubuntu-latest
++ if: startsWith(github.ref, 'refs/tags/v')
++
++ permissions:
++ contents: write
++
++ steps:
++ - uses: actions/checkout@v3
++
++ - name: Create GitHub Release
++ uses: ncipollo/release-action@v1
++ with:
++ generateReleaseNotes: true
++ draft: false
++ prerelease: false
ddiff --git a/.github/workflows/security.yml b/.github/workflows/security.yml
nnew file mode 100644
iindex 0000000..04ae151
---- /dev/null
++++ b/.github/workflows/security.yml
@@@ -0,0 +1,37 @@
++name: Security Scan
++
++on:
++ push:
++ branches: [ main ]
++ pull_request:
++ branches: [ main ]
++ schedule:
++ - cron: '0 2 * * 0' # Weekly on Sunday
++
++jobs:
++ secrets-scan:
++ runs-on: ubuntu-latest
++ steps:
++ - uses: actions/checkout@v3
++ with:
++ fetch-depth: 0
++
++ - name: TruffleHog Secret Scan
++ uses: trufflesecurity/trufflehog@main
++ with:
++ path: ./
++ base: ${{ github.event.repository.default_branch }}
++ head: HEAD
++ extra_args: --debug --json
++
++ dependency-check:
++ runs-on: ubuntu-latest
++ steps:
++ - uses: actions/checkout@v3
++
++ - name: Run Snyk
++ uses: snyk/actions/node@master
++ env:
++ SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
++ with:
++ args: --severity-threshold=high