Add initial project configuration and CI/CD workflows
Some checks failed
CI / ci (push) Has been cancelled
Some checks failed
CI / ci (push) Has been cancelled
- Created pyproject.toml to define project metadata and dependencies for the watcher-visio dashboard. - Added CI workflow in ci.yml for automated testing, linting, and security checks on push and pull request events. - Introduced docker-build.yml for building and releasing Docker images, including steps for tagging, logging in to the registry, and generating release notes.
This commit is contained in:
47
.gitea/workflows/ci.yml
Normal file
47
.gitea/workflows/ci.yml
Normal file
@@ -0,0 +1,47 @@
|
||||
name: CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main, develop]
|
||||
pull_request:
|
||||
branches: [main, develop]
|
||||
|
||||
jobs:
|
||||
ci:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: https://gitea.com/actions/checkout@v4
|
||||
|
||||
- name: Set up Python
|
||||
uses: https://gitea.com/actions/setup-python@v5
|
||||
with:
|
||||
python-version: "3.12"
|
||||
|
||||
- name: Cache pip
|
||||
uses: https://gitea.com/actions/cache@v4
|
||||
with:
|
||||
path: ~/.cache/pip
|
||||
key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-pip-
|
||||
|
||||
- name: Install dependencies
|
||||
run: pip install -r requirements.txt
|
||||
|
||||
- name: Install lint and security tools
|
||||
run: pip install ruff bandit safety
|
||||
|
||||
- name: Lint with Ruff
|
||||
run: ruff check dashboard watcher_visio
|
||||
|
||||
- name: Run tests
|
||||
env:
|
||||
USE_MOCK_DATA: "true"
|
||||
run: python manage.py test dashboard
|
||||
|
||||
- name: Security check with Bandit
|
||||
run: bandit -r dashboard watcher_visio -ll
|
||||
|
||||
- name: Security check with Safety
|
||||
run: safety check -r requirements.txt
|
||||
Reference in New Issue
Block a user