Skip to content

Commit

Permalink
Merge pull request #225 from TogetherCrew/224-hivemind-question-platf…
Browse files Browse the repository at this point in the history
…orm-agnostic-data-transformation

224 hivemind question platform agnostic data transformation
  • Loading branch information
Behzad-rabiei authored Oct 27, 2024
2 parents 7b7985c + 0a1748d commit 2031349
Show file tree
Hide file tree
Showing 258 changed files with 38,571 additions and 20,110 deletions.
25 changes: 0 additions & 25 deletions .eslintrc.json

This file was deleted.

30 changes: 30 additions & 0 deletions .github/workflows/bot-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# .github/workflows/bot-ci.yml

name: Bot CI Pipeline

on:
push:
paths:
- "bot/**"
# pull_request:
# paths:
# - "bot/**"

jobs:
lint:
uses: ./.github/workflows/lint.yml
with:
app: "bot"

test:
uses: ./.github/workflows/test.yml
with:
app: "bot"

build-push:
needs: [lint, test]
uses: ./.github/workflows/build-push.yml
with:
app: "bot"
context: "./bot"
dockerfile: "./bot/Dockerfile"
59 changes: 59 additions & 0 deletions .github/workflows/build-push.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# .github/workflows/build-push.yml
name: Build and Push Docker Image

on:
workflow_call:
inputs:
app:
description: "Name of the application (bot or hivemind-adapter)"
required: true
type: string
context:
description: "Build context path"
required: true
type: string
dockerfile:
description: "Path to the Dockerfile"
required: true
type: string

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}-${{ inputs.app }}

jobs:
build-push:
name: Build and Push Image
runs-on: ubuntu-latest
permissions:
contents: read
packages: write

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata (tags, labels)
uses: docker/metadata-action@v5
id: meta
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}

- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: ${{ inputs.context }}
file: ${{ inputs.dockerfile }}
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
11 changes: 0 additions & 11 deletions .github/workflows/ci.yml

This file was deleted.

31 changes: 31 additions & 0 deletions .github/workflows/hivemind-adapter-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# .github/workflows/hivemind-adapter-ci.yml

name: Hivemind Adapter CI Pipeline

on:
push:
paths:
- "hivemind-adapter/**"
# pull_request:
# paths:
# - "hivemind-adapter/**"

jobs:
lint:
uses: ./.github/workflows/lint.yml
with:
app: "hivemind-adapter"

# test:
# uses: ./.github/workflows/test.yml
# with:
# app: "./bot"

build-push:
# needs: [lint, test]
needs: [lint]
uses: ./.github/workflows/build-push.yml
with:
app: "hivemind-adapter"
context: "./hivemind-adapter"
dockerfile: "./hivemind-adapter/Dockerfile"
34 changes: 34 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# .github/workflows/lint.yml

name: Lint Workflow

on:
workflow_call:
inputs:
app:
description: "Path to the application directory"
required: true
type: string

jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Run Linter
uses: github/super-linter@v5.0.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TYPESCRIPT_DEFAULT_STYLE: prettier
VALIDATE_DOCKERFILE_HADOLINT: false
VALIDATE_JSCPD: false
VALIDATE_PYTHON_FLAKE8: false
VALIDATE_PYTHON_MYPY: false
FILTER_REGEX_INCLUDE: "(^|/)${{ inputs.app }}/"
VALIDATE_GIT_COMMITLINT: false
VALIDATE_MARKDOWN: false
VALIDATE_JAVASCRIPT_PRETTIER: false
VALIDATE_JAVASCRIPT_STANDARD: false
12 changes: 0 additions & 12 deletions .github/workflows/production.yml

This file was deleted.

12 changes: 0 additions & 12 deletions .github/workflows/publish.yml

This file was deleted.

18 changes: 18 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# .github/workflows/test.yml
name: Test Workflow

on:
workflow_call:
inputs:
app:
description: "Path to the application directory"
required: true
type: string

jobs:
test:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: docker compose -f ${{ inputs.app }}/docker-compose.test.yml up --exit-code-from app
Empty file removed .prettierignore
Empty file.
5 changes: 0 additions & 5 deletions .prettierrc.json

This file was deleted.

19 changes: 0 additions & 19 deletions Dockerfile

This file was deleted.

4 changes: 0 additions & 4 deletions README.md

This file was deleted.

41 changes: 0 additions & 41 deletions __tests__/fixtures/channel.fixture.ts

This file was deleted.

34 changes: 0 additions & 34 deletions __tests__/fixtures/guildMember.fixture.ts

This file was deleted.

Loading

0 comments on commit 2031349

Please sign in to comment.