Skip to content

Commit

Permalink
install libmysqlclient dev
Browse files Browse the repository at this point in the history
setup libmysqlclient envs

setup libmysqlclient envs

fix ci

setup venv

install python3.11-venv

fix ci

fix ci

fix ci

fix ci
  • Loading branch information
tsirysndr committed Nov 8, 2023
1 parent a76d69a commit 0e70d11
Showing 1 changed file with 15 additions and 6 deletions.
21 changes: 15 additions & 6 deletions src/dagger/jobs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,11 @@ export const djangoTests = async (src = ".") => {
"build-essential",
"python3-dev",
"default-libmysqlclient-dev",
])
.withExec(["pkgx", "install", "pip", "python@3.11"]);
"pkg-config",
"python3-pip",
"python3.11-venv",
"python3-full",
]);

const ctr = baseCtr
.withDirectory("/app", context, { exclude })
Expand All @@ -55,20 +58,26 @@ export const djangoTests = async (src = ".") => {
Deno.env.get("MARIADB_ROOT_PASSWORD") || "root"
)
.withEnvVariable("MARIADB_HOST", Deno.env.get("MARIADB_HOST") || "db")
.withEnvVariable("MYSQLCLIENT_CFLAGS", "-I/usr/include/mysql")
.withEnvVariable(
"MYSQLCLIENT_LDFLAGS",
"-L/usr/lib/x86_64-linux-gnu -lmysqlclient"
)
.withExec([
"sh",
"-c",
"\
python -m pip install -r requirements.txt --use-pep517 && \
python3 -m venv venv && \
chmod a+x venv/bin/activate && \
venv/bin/activate && \
pip install -r requirements.txt --use-pep517 && \
cd todo_project && \
python3 manage.py makemigrations && \
python3 manage.py migrate && \
python3 manage.py check && \
python3 manage.py test",
]);
const result = await ctr.stdout();

console.log(result);
await ctr.stdout();
});
return "Done";
};
Expand Down

0 comments on commit 0e70d11

Please sign in to comment.