diff --git a/.github/workflows/build_test_pipeline.yml b/.github/workflows/build_test_pipeline.yml deleted file mode 100644 index f61e9e9..0000000 --- a/.github/workflows/build_test_pipeline.yml +++ /dev/null @@ -1,40 +0,0 @@ -# This workflow will install Python dependencies, run tests and lint with a single version of Python -# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python - -name: Python application - -on: - push: - branches: [ "main" ] - pull_request: - branches: [ "main" ] - -permissions: - contents: read - -jobs: - build: - - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - - name: Set up Python 3.10 - uses: actions/setup-python@v3 - with: - python-version: "3.10" - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install pytest-cov coverage - if [ -f requirements.txt ]; then pip install -r requirements.txt; fi - - name: Test with pytest and generate coverage - run: | - pytest -m "not apitest" --cov - coverage xml - - - name: Upload coverage reports to Codecov - uses: codecov/codecov-action@v3 - with: - token: ${{ secrets.CODECOV_TOKEN }} - files: coverage.xml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..c058838 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,42 @@ +# This workflow will install Python dependencies, run tests and lint with a single version of Python +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python + +name: CI + +on: + push: + branches: ["main"] + pull_request: + branches: ["main"] + +permissions: + contents: read + +jobs: + build: + runs-on: ubuntu-latest + strategy: + fail-fast: true + + steps: + - uses: actions/checkout@v3 + - name: Set up Python 3.12 + uses: actions/setup-python@v3 + with: + python-version: "3.12" + - name: Install dependencies + run: | + python -m pip install --upgrade pip + cd backend + pip install pytest-cov coverage + if [ -f requirements.txt ]; then pip install -r requirements.txt; fi + - name: Test with pytest and generate coverage + run: | + pytest -m "not apitest" --cov + coverage xml + + - name: Upload coverage reports to Codecov + uses: codecov/codecov-action@v3 + with: + token: ${{ secrets.CODECOV_TOKEN }} + files: coverage.xml diff --git a/main.py b/backend/main.py similarity index 100% rename from main.py rename to backend/main.py diff --git a/requirements.txt b/backend/requirements.txt similarity index 100% rename from requirements.txt rename to backend/requirements.txt diff --git a/src/__init__.py b/backend/src/__init__.py similarity index 100% rename from src/__init__.py rename to backend/src/__init__.py diff --git a/src/agents/dungeon_master.py b/backend/src/agents/dungeon_master.py similarity index 100% rename from src/agents/dungeon_master.py rename to backend/src/agents/dungeon_master.py diff --git a/src/npc_generation.py b/backend/src/npc_generation.py similarity index 100% rename from src/npc_generation.py rename to backend/src/npc_generation.py diff --git a/src/outcome_engine/referee.py b/backend/src/outcome_engine/referee.py similarity index 100% rename from src/outcome_engine/referee.py rename to backend/src/outcome_engine/referee.py diff --git a/src/text_generation/__init__.py b/backend/src/text_generation/__init__.py similarity index 100% rename from src/text_generation/__init__.py rename to backend/src/text_generation/__init__.py diff --git a/src/text_generation/config.py b/backend/src/text_generation/config.py similarity index 100% rename from src/text_generation/config.py rename to backend/src/text_generation/config.py diff --git a/src/text_generation/text_generator.py b/backend/src/text_generation/text_generator.py similarity index 100% rename from src/text_generation/text_generator.py rename to backend/src/text_generation/text_generator.py diff --git a/src/text_to_image/__init__.py b/backend/src/text_to_image/__init__.py similarity index 100% rename from src/text_to_image/__init__.py rename to backend/src/text_to_image/__init__.py diff --git a/src/text_to_image/config.py b/backend/src/text_to_image/config.py similarity index 100% rename from src/text_to_image/config.py rename to backend/src/text_to_image/config.py diff --git a/src/text_to_image/image_generator.py b/backend/src/text_to_image/image_generator.py similarity index 100% rename from src/text_to_image/image_generator.py rename to backend/src/text_to_image/image_generator.py diff --git a/src/text_to_speech/__init__.py b/backend/src/text_to_speech/__init__.py similarity index 100% rename from src/text_to_speech/__init__.py rename to backend/src/text_to_speech/__init__.py diff --git a/src/text_to_speech/speech_config.py b/backend/src/text_to_speech/speech_config.py similarity index 100% rename from src/text_to_speech/speech_config.py rename to backend/src/text_to_speech/speech_config.py diff --git a/src/text_to_speech/text_to_speech.py b/backend/src/text_to_speech/text_to_speech.py similarity index 100% rename from src/text_to_speech/text_to_speech.py rename to backend/src/text_to_speech/text_to_speech.py