Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/develop' into sams-develop
Browse files Browse the repository at this point in the history
  • Loading branch information
petrjasek committed Feb 20, 2025
2 parents fc4e0a1 + 28ca944 commit 2ce9c09
Show file tree
Hide file tree
Showing 187 changed files with 14,615 additions and 2,103 deletions.
3 changes: 0 additions & 3 deletions .dockerignore

This file was deleted.

3 changes: 2 additions & 1 deletion .fireq.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"sams": true
"sams": true,
"elastic": 7
}
41 changes: 41 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file

version: 2
updates:
- package-ecosystem: "npm" # See documentation for possible values
directory: "client" # Location of package manifests
schedule:
interval: "daily"
- package-ecosystem: "pip" # See documentation for possible values
directory: "server" # Location of package manifests
schedule:
interval: "daily"
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"

- package-ecosystem: "npm"
target-branch: release/2.8
directory: "client"
schedule:
interval: "daily"
- package-ecosystem: "pip"
target-branch: release/2.8
directory: "server"
schedule:
interval: "daily"

- package-ecosystem: "npm"
target-branch: async
directory: "client"
schedule:
interval: "daily"
- package-ecosystem: "pip"
target-branch: async
directory: "server"
schedule:
interval: "daily"
24 changes: 24 additions & 0 deletions .github/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
version: "3.2"

services:
elastic:
image: docker.elastic.co/elasticsearch/elasticsearch:7.10.1
ports:
- "9200:9200"
environment:
- discovery.type=single-node
tmpfs:
- /usr/share/elasticsearch/data

redis:
image: redis:alpine
ports:
- "6379:6379"

mongo:
image: mongo:4.4
ports:
- "27017:27017"
tmpfs:
- /data/db

55 changes: 55 additions & 0 deletions .github/workflows/behave.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: "Behave"

on:
workflow_call:
inputs:
python-version:
description: "Python version"
required: false
default: "3.10"
type: string

jobs:
behave:
runs-on: ubuntu-latest

defaults:
run:
working-directory: server

services:
redis:
image: redis:alpine
ports:
- "6379:6379"

mongo:
image: mongo:4
ports:
- "27017:27017"

elastic:
image: docker.elastic.co/elasticsearch/elasticsearch:7.17.25
ports:
- "9200:9200"
env:
discovery.type: single-node

steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v5
with:
python-version: ${{ inputs.python-version }}
cache: pip

- run: |
sudo apt-get update
sudo apt-get -y install libxml2-dev libxmlsec1-dev libxmlsec1-openssl libexempi-dev
- run: |
python -m pip install -U pip wheel setuptools
python -m pip install -Ur dev-requirements.txt
- run: behave

31 changes: 31 additions & 0 deletions .github/workflows/client.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: "Client"

on:
workflow_call:
inputs:
node-version:
description: "Node version"
required: false
default: "14"
type: string

jobs:
install:
runs-on: ubuntu-latest

defaults:
run:
working-directory: client

steps:
- uses: actions/checkout@v4

- uses: actions/setup-node@v4
with:
node-version: ${{ inputs.node-version }}
cache: npm
cache-dependency-path: client/package-lock.json

- run: npm ci
- run: npm run build

13 changes: 13 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: "Docker"

on:
workflow_call:

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- run: docker compose build
22 changes: 22 additions & 0 deletions .github/workflows/dockerhub.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Publish Docker Images

on:
release:
types: [released]

jobs:
push_to_dockerhub:
name: Push Docker images to Docker Hub
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Build and push image
run: docker-compose build && docker-compose push
36 changes: 36 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: "Lint"

on:
workflow_call:

defaults:
run:
working-directory: server

jobs:

black:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- run: pip install "black>=24,<25"
- run: black --diff .

flake8:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- run: pip install flake8
- run: flake8

mypy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.10'
- run: pip install -r dev-requirements.txt
- run: mypy .
56 changes: 56 additions & 0 deletions .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: "Pytest"

on:
workflow_call:
inputs:
python-version:
description: "Python version"
required: false
default: "3.10"
type: string

jobs:

pytest:
runs-on: ubuntu-latest

defaults:
run:
working-directory: server

services:
redis:
image: redis:alpine
ports:
- "6379:6379"

mongo:
image: mongo:4
ports:
- "27017:27017"

elastic:
image: docker.elastic.co/elasticsearch/elasticsearch:7.17.25
ports:
- "9200:9200"
env:
discovery.type: single-node

steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v5
with:
python-version: ${{ inputs.python-version }}
cache: pip

- run: |
sudo apt-get update
sudo apt-get -y install libxml2-dev libxmlsec1-dev libxmlsec1-openssl libexempi-dev
- run: |
python -m pip install -U pip wheel setuptools
python -m pip install -Ur dev-requirements.txt
- run: pytest

89 changes: 89 additions & 0 deletions .github/workflows/server.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
name: "Server"

on:
workflow_call:
inputs:
python-version:
description: "Python version"
required: false
default: "3.10"
type: string

defaults:
run:
working-directory: server

jobs:
install:
runs-on: ubuntu-latest

services:
redis:
image: redis:alpine
ports:
- "6379:6379"

mongo:
image: mongo:4
ports:
- "27017:27017"

elastic:
image: docker.elastic.co/elasticsearch/elasticsearch:7.17.25
ports:
- "9200:9200"
env:
discovery.type: single-node

steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v5
with:
python-version: ${{ inputs.python-version }}
cache: 'pip'

- run: |
sudo apt-get update
sudo apt-get -y install libxml2-dev libxmlsec1-dev libxmlsec1-openssl libexempi-dev
- run: |
python -m pip install -U pip wheel setuptools
python -m pip install -Ur dev-requirements.txt
- name: init
run: |
honcho run python manage.py app:initialize_data
if: ${{ inputs.python-version != '3.12' }} # There is some issue with the 3.12 version atm

black:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ inputs.python-version }}
cache: 'pip'
- run: pip install -Ur dev-requirements.txt
- run: black --check .

flake8:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ inputs.python-version }}
- run: pip install -Ur dev-requirements.txt
- run: flake8

mypy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ inputs.python-version }}
cache: 'pip'
- run: pip install -Ur dev-requirements.txt
- run: mypy .
Loading

0 comments on commit 2ce9c09

Please sign in to comment.