Skip to content

Commit

Permalink
chore: reorganize files and directories
Browse files Browse the repository at this point in the history
  • Loading branch information
tonitienda committed Apr 30, 2024
1 parent 76e14fa commit f7e4950
Show file tree
Hide file tree
Showing 16 changed files with 108 additions and 108 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-run-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:
strategy:
matrix:
runner: [cypress]
frontend: [next, golang-htmx]
frontend: [nextjs, htmx-go]
backend: [go, js]
db: [inmemory, mongo]
steps:
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: '3.7'
services:
webapp:
build:
context: ./webapp-golang-htmx
context: ./webapp-htmx-go
dockerfile: Dockerfile
depends_on:
- backend
Expand Down
File renamed without changes.
File renamed without changes.
28 changes: 14 additions & 14 deletions generate-justfile.js
Original file line number Diff line number Diff line change
@@ -1,39 +1,39 @@
const fs = require("node:fs");

const frontEnds = ["next", "golang-htmx"];
const frontEnds = ["nextjs", "htmx-go"];
const backends = ["go", "js"];
const e2eRunners = ["cypress"];
const apiRunners = ["bdd-go"];
const systemtests = ["bdd-go"];
const dbs = ["inmemory", "mongo"];

const makeJustE2ETestTasks = ({ frontend, backend, runner, db }) => `
test-${runner}-${frontend}-${backend}-${db}:
docker compose \\
-f compose.${frontend}-frontend.yaml \\
-f compose.${backend}-backend.yaml \\
-f compose.frontend-${frontend}.yaml \\
-f compose.backend-${backend}.yaml \\
-f compose.db-${db}.yaml \\
-f compose.e2e-${runner}.yaml \\
config
COMPOSE_PROJECT_NAME="kadai-${runner}-${frontend}-${backend}-${db}" docker compose \\
-f compose.${frontend}-frontend.yaml \\
-f compose.${backend}-backend.yaml \\
-f compose.frontend-${frontend}.yaml \\
-f compose.backend-${backend}.yaml \\
-f compose.db-${db}.yaml \\
-f compose.e2e-${runner}.yaml \\
up --build --exit-code-from e2e
`;

const makeJustApiTestTasks = ({ backend, runner, db }) => `
const makeJustSystemTestTasks = ({ backend, runner, db }) => `
test-${runner}-${backend}-${db}:
docker compose \\
-f compose.${backend}-backend.yaml \\
-f compose.backend-${backend}.yaml \\
-f compose.db-${db}.yaml \\
-f compose.e2e-${runner}.yaml \\
-f compose.system-${runner}.yaml \\
config
COMPOSE_PROJECT_NAME="kadai-${runner}-${backend}-${db}" docker compose \\
-f compose.${backend}-backend.yaml \\
-f compose.backend-${backend}.yaml \\
-f compose.db-${db}.yaml \\
-f compose.e2e-${runner}.yaml \\
up --build --exit-code-from e2e
Expand Down Expand Up @@ -72,8 +72,8 @@ const appCombinations = frontEnds.flatMap((f) =>
}))
);

const apiTestsCombinations = apiCombinations.flatMap((a) =>
apiRunners.flatMap((r) => ({
const systemTestsCombinations = apiCombinations.flatMap((a) =>
systemtests.flatMap((r) => ({
...a,
runner: r,
}))
Expand All @@ -95,8 +95,8 @@ const contents =
(contents, combination) => contents + makeJustE2ETestTasks(combination),
""
) +
apiTestsCombinations.reduce(
(contents, combination) => contents + makeJustApiTestTasks(combination),
systemTestsCombinations.reduce(
(contents, combination) => contents + makeJustSystemTestTasks(combination),
""
);

Expand Down
Loading

0 comments on commit f7e4950

Please sign in to comment.