File tree Expand file tree Collapse file tree 2 files changed +35
-1
lines changed Expand file tree Collapse file tree 2 files changed +35
-1
lines changed Original file line number Diff line number Diff line change 1+ name : CI Tests
2+
3+ on :
4+ push :
5+ branches : [ "master" ]
6+ pull_request :
7+ branches : [ "master" ]
8+
9+ jobs :
10+ test :
11+ runs-on : ubuntu-latest
12+
13+ steps :
14+ - name : Check out repository
15+ uses : actions/checkout@v3
16+
17+ - name : Set up Python 3.12
18+ uses : actions/setup-python@v4
19+ with :
20+ python-version : " 3.12"
21+
22+ - name : Install dependencies
23+ run : |
24+ python -m pip install --upgrade pip
25+ pip install -r requirements.txt
26+
27+ - name : Run pytest
28+ run : pytest --maxfail=1 --disable-warnings -v
29+
30+ env :
31+ XDOC_OPENAI_API_KEY : ${{ secrets.XDOC_OPENAI_API_KEY }}
Original file line number Diff line number Diff line change 5858from xdoc .internal .loggers import logger , DISABLE_LOGGER_ENV_VAR_NAME
5959
6060
61- load_dotenv ()
61+ # If .env exists locally, it’ll be loaded. If it doesn’t exist (e.g. in CI),
62+ # no error is raised. Then fallback to environment variables set by the workflow.
63+
64+ load_dotenv () # This will silently skip if no .env is present
6265
6366
6467@pytest .fixture (scope = "module" )
You can’t perform that action at this time.
0 commit comments