Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@

version: 2
updates:
# Monitor Python dependencies via pip
- package-ecosystem: "pip"
# Monitor Go module dependencies
- package-ecosystem: "gomod"
directory: "/"
schedule:
interval: "weekly"
day: "monday"
time: "09:00"
# Group all minor and patch updates together
groups:
python-dependencies:
go-dependencies:
patterns:
- "*"
update-types:
Expand All @@ -23,7 +23,7 @@ updates:
# Add labels for easy filtering
labels:
- "dependencies"
- "python"
- "go"
# Target the main branch
target-branch: "main"

Expand Down
88 changes: 45 additions & 43 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,22 @@ name: Continuous integration

on:
push:
branches: [ main, develop ]
branches:
- main
- develop
paths:
- 'src/**'
- 'tests/**'
- 'pyproject.toml'
- 'uv.lock'
- '**/*.go'
- 'go.mod'
- 'go.sum'
- '.github/workflows/CI.yml'
pull_request:
branches: [ main, develop ]
branches:
- main
- develop
paths:
- 'src/**'
- 'tests/**'
- 'pyproject.toml'
- 'uv.lock'
- '**/*.go'
- 'go.mod'
- 'go.sum'
- '.github/workflows/CI.yml'

jobs:
Expand All @@ -24,70 +26,70 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ['3.11']
go-version: ['1.22']

steps:
- uses: actions/checkout@v6

- name: Install ffmpeg and tkinter (Ubuntu)
run: |
sudo apt-get update
sudo apt-get install -y ffmpeg python3-tk
- name: Install ffmpeg
run: sudo apt-get update && sudo apt-get install -y ffmpeg

- name: Set up UV
uses: astral-sh/setup-uv@v7
- name: Set up Go
uses: actions/setup-go@v5
with:
python-version: ${{ matrix.python-version }}
go-version: ${{ matrix.go-version }}

- name: Install the project dependencies
run: uv sync --locked --all-extras --dev
- name: Download dependencies
run: go mod download

- name: Run tests
run: |
uv run pytest
run: go test ./...

coverage:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v6
- uses: actions/checkout@v4

- name: Install ffmpeg
run: sudo apt-get update && sudo apt-get install -y ffmpeg

- name: Set up UV
uses: astral-sh/setup-uv@v7
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.22'

- name: Install the project dependencies
run: uv sync --locked --all-extras --dev
- name: Download dependencies
run: go mod download

- name: Run tests
run: |
uv run pytest --cov=morphic --cov-report=xml
- name: Run tests with coverage
run: go test -coverprofile=coverage.out ./...

- name: Convert coverage to lcov
run: go tool cover -html=coverage.out -o coverage.html

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v6
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
slug: exTerEX/morphic
fail_ci_if_error: true
files: ./coverage.xml
files: ./coverage.out
flags: unittests
verbose: true

syntax-check:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6

- name: Set up UV
uses: astral-sh/setup-uv@v7
- uses: actions/checkout@v4

- name: Install the project dependencies
run: uv sync --locked --all-extras --dev
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.22'

- name: Run Ruff format
run: uv run ruff format --check
- name: Run go vet
run: go vet ./...

- name: Run Ruff linter
run: uv run ruff check --output-format=github .
- name: Build
run: go build ./...
35 changes: 20 additions & 15 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,24 @@ name: "CodeQL Advanced"

on:
push:
branches: [ "main" ]
branches:
- main
- develop
- feature/**
paths:
- 'src/**'
- 'tests/**'
- '**/*.go'
- 'go.mod'
- 'go.sum'
- '.github/workflows/codeql.yml'
pull_request:
branches: [ "main" ]
branches:
- main
- develop
- feature/**
paths:
- 'src/**'
- 'tests/**'
- '**/*.go'
- 'go.mod'
- 'go.sum'
- '.github/workflows/codeql.yml'
schedule:
- cron: '25 8 * * 5'
Expand Down Expand Up @@ -40,10 +48,8 @@ jobs:
fail-fast: false
matrix:
include:
- language: actions
build-mode: none
- language: python
build-mode: none
- language: go
build-mode: autobuild
# CodeQL supports the following values keywords for 'language': 'actions', 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'rust', 'swift'
# Use `c-cpp` to analyze code written in C, C++ or both
# Use 'java-kotlin' to analyze code written in Java, Kotlin or both
Expand All @@ -56,11 +62,10 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v6

# Add any setup steps before running the `github/codeql-action/init` action.
# This includes steps like installing compilers or runtimes (`actions/setup-node`
# or others). This is typically only required for manual builds.
# - name: Setup runtime (example)
# uses: actions/setup-example@v1
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
Expand Down
52 changes: 27 additions & 25 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,26 +5,24 @@ on:
branches:
- main
paths:
- 'src/**'
- 'docs/**'
- 'pyproject.toml'
- 'README.md'
- '.github/workflows/documentation.yml'
pull_request:
branches:
- main
paths:
- 'src/**'
- 'docs/**'
- 'pyproject.toml'
- 'README.md'
- '.github/workflows/documentation.yml'

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
# Allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

# Allow only one concurrent deployment
# Only one concurrent deployment; skip queued runs but do not cancel in-progress
concurrency:
group: "pages"
cancel-in-progress: false
Expand All @@ -34,38 +32,42 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v6
- name: Checkout
uses: actions/checkout@v6

- name: Install uv
uses: astral-sh/setup-uv@v7
- name: Setup Ruby (for Jekyll)
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.3'
bundler-cache: true
working-directory: docs

- name: Install the project dependencies
run: uv sync --dev
- name: Setup Pages
id: pages
uses: actions/configure-pages@v5

- name: Build documentation
- name: Build with Jekyll
run: |
cd docs
uv run sphinx-build -b html . _build/html
touch _build/html/.nojekyll

- name: Setup Pages
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
uses: actions/configure-pages@v6
bundle exec jekyll build --baseurl "${{ steps.pages.outputs.base_path }}"
env:
JEKYLL_ENV: production

- name: Upload artifact for GitHub Pages
uses: actions/upload-pages-artifact@v5
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
with:
path: docs/_build/html/
path: docs/_site/

- name: Upload documentation artifact (PR)
uses: actions/upload-artifact@v7
- name: Upload artifact (PR preview)
if: github.event_name == 'pull_request'
uses: actions/upload-artifact@v7
with:
name: documentation
path: docs/_build/html/
name: docs-preview
path: docs/_site/
retention-days: 7

deploy:
deploy: # Only deploy on push to main, not on PRs
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
needs: build
runs-on: ubuntu-latest
Expand All @@ -76,4 +78,4 @@ jobs:
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v5
uses: actions/deploy-pages@v4
Loading
Loading