Skip to content

Commit

Permalink
add sample just workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
mahesh-naxa committed Dec 11, 2024
1 parent b9287ae commit afbcf9e
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 2 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/just-file-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Just CI Workflow

on:
push:
branches:
- feat-justfile

jobs:
test-and-lint:
runs-on: ubuntu-latest

steps:
# Step 1: Checkout the repository
- name: Checkout repository
uses: actions/checkout@v3

- uses: extractions/setup-just@v2
with:
just-version: '1.37.0'

# Step 3: Run backend functional tests
- name: Run backend functional tests
run: just backend-functional-tests

# Step 4: Run backend code checks
- name: Run backend code checks
run: just backend-code-check
6 changes: 4 additions & 2 deletions Justfile
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,13 @@ backend-functional-tests:
"$POSTGRES_IMAGE"

# Build the backend image with a unique name
echo "Building backend image: $BACKEND_IMAGE"
docker build -t "$BACKEND_IMAGE" .

docker inspect $POSTGRES_CONTAINER_NAME
docker network ls
docker exec $POSTGRES_CONTAINER_NAME env

# Run the backend container with a unique name
echo "Running backend container: $BACKEND_CONTAINER_NAME"
docker run --rm --name "$BACKEND_CONTAINER_NAME" \
-e SQLALCHEMY_DATABASE_URI="postgresql://taskingmanager:$POSTGRES_PASSWORD@$POSTGRES_CONTAINER_NAME/test_tm" \
-e POSTGRES_TEST_DB="test_tm" \
Expand Down

0 comments on commit afbcf9e

Please sign in to comment.