Skip to content

Commit

Permalink
Update tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
riga committed Oct 13, 2023
1 parent 0ff1b1f commit 1717fd0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 0 additions & 8 deletions .github/workflows/lint_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,21 +73,13 @@ jobs:
with:
persist-credentials: false

- name: Checkout order-data 📊
uses: actions/checkout@v4
with:
name: cms-cat/order-data
persist-credentials: false

- name: Install dependencies ☕️
run: |
pip install -U pip setuptools
pip install .[dev]
- name: Test 🎢
run: |
export ORDER_DATA_LOCATION="${PWD}/order-data"
export ORDER_COLORS="False"
./tests/test.sh
coverage:
Expand Down
8 changes: 8 additions & 0 deletions order/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,14 @@
__status__, __version__,
)

# update env variables
import os
_on_gh = bool(os.getenv("GITHUB_ACTION"))
_on_rtd = bool(os.getenv("READTHEDOCS"))
if _on_gh or _on_rtd:
os.environ.setdefault("ORDER_DATA_LOCATION", os.getcwd())
os.environ["ORDER_COLORS"] = False

# provisioning imports
from order.settings import Settings
from order.types import Lazy
Expand Down

0 comments on commit 1717fd0

Please sign in to comment.