Skip to content
This repository has been archived by the owner on Oct 23, 2024. It is now read-only.

Commit

Permalink
Various minor process improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
LuckierDodge committed Mar 22, 2024
1 parent ae35e75 commit a9d5ddc
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 10 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/docker-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,12 @@ jobs:
uses: docker/metadata-action@96383f45573cb7f253c731d3b3ab81c87ef81934 # v5.0.0
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=schedule
type=ref,event=branch
type=ref,event=tag
type=ref,event=pr
type=raw,value=latest,enable={{is_default_branch}}
# Build and push Docker image with Buildx (don't push on PR)
# https://github.com/docker/build-push-action
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,12 @@ jobs:
uses: docker/metadata-action@96383f45573cb7f253c731d3b3ab81c87ef81934 # v5.0.0
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=schedule
type=ref,event=branch
type=ref,event=tag
type=ref,event=pr
type=raw,value=latest,enable={{is_default_branch}}
# Build and push Docker image with Buildx (don't push on PR)
# https://github.com/docker/build-push-action
Expand Down
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ checks: # Runs all the pre-commit checks
@pre-commit run --all-files || { echo "Checking fixes\n" ; pre-commit run --all-files; }

test: init .env paths # Runs all the tests
@docker compose -f wei.compose.yaml --env-file .env up --build -d
@docker compose -f wei.compose.yaml --env-file .env exec sleep_module pytest -p no:cacheprovider sleep_module
@docker compose -f wei.compose.yaml --env-file .env down
@docker compose -f tests/wei.compose.yaml --env-file .env up --build -d
@docker compose -f tests/wei.compose.yaml --env-file .env exec sleep_module pytest -p no:cacheprovider sleep_module
@docker compose -f tests/wei.compose.yaml --env-file .env down

clean:
@rm .env
2 changes: 1 addition & 1 deletion compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ services:
- ./src:/home/app/sleep_module/src
- ./tests:/home/app/sleep_module/tests
env_file: .env
command: python sleep_module/src/sleep_rest_node.py
command: python -m sleep_rest_node --port 2000
ports:
- 2000:2000
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "sleep_module"
version = "1.2.0"
version = "1.3.0"
description = "A simple example module that implements a sleep(t) function"
authors = [{name = "Ryan D. Lewis", email="[email protected]"}]
dependencies = [
Expand Down
10 changes: 5 additions & 5 deletions wei.compose.yaml → tests/wei.compose.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
include: [compose.yaml]
include: [../compose.yaml]
#####################
# WEI Core Services #
#####################
Expand All @@ -8,14 +8,14 @@ services:
container_name: wei_server
ports:
- 8000:8000
env_file: .env
env_file: ../.env
environment:
- PYTHONUNBUFFERED=1 # Fix weird bug with empty logging
volumes:
- ${WORKCELLS_DIR}:/workcell_defs
- ${WEI_DATA_DIR}:/home/app/.wei
- diaspora_config:/home/app/.diaspora
command: python3 -m wei.server --workcell /workcell_defs/${WORKCELL_FILENAME} --use_diaspora ${USE_DIASPORA}
command: python3 -m wei.server --workcell /workcell_defs/${WORKCELL_FILENAME}
depends_on:
- wei_redis
wei_engine:
Expand All @@ -24,10 +24,10 @@ services:
volumes:
- ${WORKCELLS_DIR}:/workcell_defs
- ${WEI_DATA_DIR}:/home/app/.wei
env_file: .env
env_file: ../.env
environment:
- PYTHONUNBUFFERED=1 # Fix weird bug with empty logging
command: python3 -m wei.engine --workcell /workcell_defs/${WORKCELL_FILENAME} --use_diaspora ${USE_DIASPORA}
command: python3 -m wei.engine --workcell /workcell_defs/${WORKCELL_FILENAME}
depends_on:
- wei_redis
- wei_server
Expand Down

0 comments on commit a9d5ddc

Please sign in to comment.