mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
change the way the tests are ran as i don't like makefile
This commit is contained in:
parent
6e8f29afc8
commit
8294a80fdf
2 changed files with 8 additions and 40 deletions
18
.github/workflows/unit_tests.yml
vendored
18
.github/workflows/unit_tests.yml
vendored
|
|
@ -14,17 +14,15 @@ jobs:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Set up Python 3.11
|
- name: Build test image
|
||||||
uses: actions/setup-python@v4
|
run: docker build -f Dockerfile.test -t model-test .
|
||||||
with:
|
|
||||||
python-version: '3.11'
|
|
||||||
|
|
||||||
- name: Install tox via Makefile
|
- name: Run tests
|
||||||
run: |
|
|
||||||
make setup
|
|
||||||
|
|
||||||
- name: Run tests with tox via Makefile
|
|
||||||
env:
|
env:
|
||||||
EPC_AUTH_TOKEN: ${{ secrets.DEV_EPC_AUTH_TOKEN }}
|
EPC_AUTH_TOKEN: ${{ secrets.DEV_EPC_AUTH_TOKEN }}
|
||||||
|
|
||||||
run: |
|
run: |
|
||||||
make test
|
docker run --rm \
|
||||||
|
-e EPC_AUTH_TOKEN=${{ secrets.DEV_EPC_AUTH_TOKEN }} \
|
||||||
|
-e HUBSPOT_API_KEY=${{ secrets.HUBSPOT_API_KEY }} \
|
||||||
|
model-test pytest
|
||||||
|
|
|
||||||
30
Makefile
30
Makefile
|
|
@ -1,30 +0,0 @@
|
||||||
# Project Makefile
|
|
||||||
|
|
||||||
PYTHON = python
|
|
||||||
|
|
||||||
.PHONY: setup test lint typecheck check clean
|
|
||||||
|
|
||||||
# Install dev dependencies + tox
|
|
||||||
setup:
|
|
||||||
$(PYTHON) -m pip install --upgrade pip
|
|
||||||
$(PYTHON) -m pip install tox black ruff mypy
|
|
||||||
|
|
||||||
# Run tests (pass ARGS="..." for specific tests)
|
|
||||||
test:
|
|
||||||
tox -- $(ARGS)
|
|
||||||
|
|
||||||
# Code formatting check + linting
|
|
||||||
lint:
|
|
||||||
ruff .
|
|
||||||
black --check .
|
|
||||||
|
|
||||||
# Static type checks
|
|
||||||
typecheck:
|
|
||||||
mypy .
|
|
||||||
|
|
||||||
# Full quality check (all checks + tests)
|
|
||||||
check: lint typecheck test
|
|
||||||
|
|
||||||
# Clean up tox environments
|
|
||||||
clean:
|
|
||||||
rm -rf .tox
|
|
||||||
Loading…
Add table
Reference in a new issue