mirror of
https://github.com/umbra2728/ctfd-mcp.git
synced 2026-02-07 22:08:12 +03:00
fix: CI workflow improvements and test config patch path fix
This commit is contained in:
4
.github/workflows/publish.yml
vendored
4
.github/workflows/publish.yml
vendored
@@ -3,8 +3,11 @@ name: Publish
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches: [main]
|
||||
tags:
|
||||
- "v*"
|
||||
pull_request:
|
||||
branches: [main]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
@@ -43,6 +46,7 @@ jobs:
|
||||
publish:
|
||||
needs: build
|
||||
runs-on: ubuntu-latest
|
||||
if: startsWith(github.ref, 'refs/tags/v')
|
||||
environment:
|
||||
name: pypi
|
||||
url: https://pypi.org/p/ctfd-mcp
|
||||
|
||||
@@ -19,7 +19,7 @@ from ctfd_mcp.config import load_config
|
||||
|
||||
def _load_with_env(env: dict[str, str]):
|
||||
"""Load config with isolated env and no .env side effects."""
|
||||
with patch("config.load_dotenv", return_value=None):
|
||||
with patch("ctfd_mcp.config.load_dotenv", return_value=None):
|
||||
with patch.dict(os.environ, env, clear=True):
|
||||
return load_config()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user