Compare commits
2 commits
2acfcc871f
...
a5b275fa12
| Author | SHA1 | Date | |
|---|---|---|---|
| a5b275fa12 | |||
| 56aec8982c |
6 changed files with 24 additions and 6 deletions
|
|
@ -13,3 +13,5 @@ steps:
|
||||||
- event: pull_request
|
- event: pull_request
|
||||||
evaluate: 'CI_COMMIT_PULL_REQUEST_LABELS contains "ci-ready"'
|
evaluate: 'CI_COMMIT_PULL_REQUEST_LABELS contains "ci-ready"'
|
||||||
- event: manual
|
- event: manual
|
||||||
|
depends_on:
|
||||||
|
- name: python
|
||||||
|
|
|
||||||
|
|
@ -12,3 +12,5 @@ steps:
|
||||||
when:
|
when:
|
||||||
- event: [ tag, push, manual ]
|
- event: [ tag, push, manual ]
|
||||||
branch: master
|
branch: master
|
||||||
|
depends_on:
|
||||||
|
- name: python
|
||||||
|
|
|
||||||
16
.woodpecker/python.yaml
Normal file
16
.woodpecker/python.yaml
Normal file
|
|
@ -0,0 +1,16 @@
|
||||||
|
steps:
|
||||||
|
- name: test
|
||||||
|
image: ghcr.io/astral-sh/uv:0.9-python3.12-alpine
|
||||||
|
commands:
|
||||||
|
- uv sync
|
||||||
|
- pytest
|
||||||
|
- |
|
||||||
|
python src/karl/__init__.py 2>&1 | while IFS= read -r line; do
|
||||||
|
echo "$line"
|
||||||
|
if echo "$line" | grep -q "Uvicorn running on"; then
|
||||||
|
pkill -f "uvicorn"
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
when:
|
||||||
|
- event: push
|
||||||
|
|
@ -2,7 +2,7 @@ from git import Repo, Remote
|
||||||
from injectable import injectable
|
from injectable import injectable
|
||||||
|
|
||||||
from karl.config import GitConfig, get_settings
|
from karl.config import GitConfig, get_settings
|
||||||
from model.vcs import Head
|
from karl.model.vcs import Head
|
||||||
|
|
||||||
|
|
||||||
@injectable(singleton=True)
|
@injectable(singleton=True)
|
||||||
|
|
|
||||||
|
|
@ -8,8 +8,7 @@ from karl.services.mo import Mo
|
||||||
|
|
||||||
@pytest.fixture(scope='class')
|
@pytest.fixture(scope='class')
|
||||||
def target_path():
|
def target_path():
|
||||||
# p = Path('tests/files/test1/test.env')
|
p = Path('tests/files/test1/test.env')
|
||||||
p = Path('files/test1/test.env')
|
|
||||||
# posprzątaj przed testem, gdyby plik istniał z poprzednich uruchomień
|
# posprzątaj przed testem, gdyby plik istniał z poprzednich uruchomień
|
||||||
if p.exists():
|
if p.exists():
|
||||||
p.unlink()
|
p.unlink()
|
||||||
|
|
@ -22,8 +21,7 @@ def target_path():
|
||||||
@pytest.fixture(scope='class')
|
@pytest.fixture(scope='class')
|
||||||
def test1_content(target_path: Path):
|
def test1_content(target_path: Path):
|
||||||
mo = Mo(Passwords())
|
mo = Mo(Passwords())
|
||||||
mo.process(Path('files/test1/test.mo.env').absolute())
|
mo.process(Path('tests/files/test1/test.mo.env').absolute())
|
||||||
# mo.process(Path('tests/files/test1/test.mo.env').absolute())
|
|
||||||
|
|
||||||
assert target_path.absolute().exists()
|
assert target_path.absolute().exists()
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
from core import woodpecker
|
from karl.core import woodpecker
|
||||||
|
|
||||||
files = [".gitignore", "compose/nginx/docker-compose.yaml", "config/heimdall.kdbx", "files/nginx/cert/fullchain.mo.pem",
|
files = [".gitignore", "compose/nginx/docker-compose.yaml", "config/heimdall.kdbx", "files/nginx/cert/fullchain.mo.pem",
|
||||||
"files/nginx/cert/key.mo.pem", "files/nginx/conf.d/default.conf", "files/nginx/conf.d/forge.conf",
|
"files/nginx/cert/key.mo.pem", "files/nginx/conf.d/default.conf", "files/nginx/conf.d/forge.conf",
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue