|
| 1 | +#!/usr/bin/env -S just --justfile |
| 2 | +# ^ A shebang isn't required, but allows a justfile to be executed |
| 3 | +# like a script, with `./justfile lint`, for example. |
| 4 | +# Use powershell for Windows so that 'Git Bash' and 'PyCharm Terminal' get the same result |
| 5 | + |
1 | 6 | set windows-shell := ["powershell.exe", "-NoLogo", "-Command"] |
2 | 7 |
|
3 | 8 | src_dir := "aerich" |
4 | | -checkfiles := "aerich tests/ conftest.py" |
| 9 | +checkfiles := src_dir + " tests/ conftest.py" |
5 | 10 | pytest_opts := "--cov=aerich --cov-append --tb=native -q" |
6 | | -mysql_url := "mysql://root:" + env_var_or_default("MYSQL_PASS", "123456") + "@" + env_var_or_default("MYSQL_HOST", "127.0.0.1") + ":" + env_var_or_default("MYSQL_PORT", "3306") + "/test_\\{\\}" |
7 | | -postgres_url := "postgres://postgres:" + env_var_or_default("POSTGRES_PASS", "123456") + "@" + env_var_or_default("POSTGRES_HOST", "127.0.0.1") + ":" + env_var_or_default("POSTGRES_PORT", "5432") + "/test_\\{\\}" |
8 | | -psycopg_url := "psycopg://postgres:" + env_var_or_default("POSTGRES_PASS", "123456") + "@" + env_var_or_default("POSTGRES_HOST", "127.0.0.1") + ":" + env_var_or_default("POSTGRES_PORT", "5432") + "/test_\\{\\}" |
| 11 | +test_db := "/test_\\{\\}" |
| 12 | +mysql_url := "mysql://root:" + env_var_or_default("MYSQL_PASS", "123456") + "@" + env_var_or_default("MYSQL_HOST", "127.0.0.1") + ":" + env_var_or_default("MYSQL_PORT", "3306") + test_db |
| 13 | +postgres_test_uri := env_var_or_default("POSTGRES_USER", "postgres") + ":" + env_var_or_default("POSTGRES_PASS", "123456") + "@" + env_var_or_default("POSTGRES_HOST", "127.0.0.1") + ":" + env_var_or_default("POSTGRES_PORT", "5432") + test_db |
| 14 | +postgres_url := "postgres://" + postgres_test_uri |
| 15 | +psycopg_url := "psycopg://" + postgres_test_uri |
9 | 16 |
|
10 | 17 | default: |
11 | 18 | @just --list |
|
0 commit comments