@@ -12,92 +12,61 @@ jobs:
1212 runs-on : ubuntu-latest
1313 steps :
1414 - uses : actions/checkout@v4
15-
1615 - name : Set up Python 3.12
1716 uses : actions/setup-python@v5
1817 with :
1918 python-version : ' 3.12'
20-
2119 - name : Install dependencies
2220 run : |
2321 python -m pip install --upgrade pip
2422 pip install "ruff==0.15.8" mypy
2523 pip install -e .
26-
2724 - name : Run ruff linter
28- run : |
29- echo "Running ruff check..."
30- ruff check src/ tests/ --output-format=github
31-
25+ run : ruff check src/ tests/ --output-format=github
3226 - name : Run ruff formatter check
33- run : |
34- echo "Checking code formatting..."
35- ruff format --check src/ tests/
36-
27+ run : ruff format --check src/ tests/
3728 - name : Run mypy type checker
38- run : |
39- echo "Running mypy type checker..."
40- mypy src/skill_seekers --show-error-codes --pretty
41- continue-on-error : true # Don't fail CI on mypy errors initially
29+ run : mypy src/skill_seekers --show-error-codes --pretty
30+ continue-on-error : true
4231
43- test :
32+ test-fast :
33+ name : Fast Unit Tests (parallel)
4434 runs-on : ${{ matrix.os }}
4535 strategy :
4636 fail-fast : false
4737 matrix :
4838 os : [ubuntu-latest, macos-latest]
4939 python-version : ['3.10', '3.11', '3.12']
5040 exclude :
51- # Exclude some combinations to speed up CI
5241 - os : macos-latest
5342 python-version : ' 3.10'
54-
5543 steps :
5644 - uses : actions/checkout@v4
5745 with :
58- submodules : recursive # Initialize api/configs_repo submodule
59-
46+ submodules : recursive
6047 - name : Set up Python ${{ matrix.python-version }}
6148 uses : actions/setup-python@v5
6249 with :
6350 python-version : ${{ matrix.python-version }}
64-
65- - name : Install uv
66- run : |
67- curl -LsSf https://astral.sh/uv/install.sh | sh
68- echo "$HOME/.local/bin" >> $GITHUB_PATH
69-
7051 - name : Cache pip packages
7152 uses : actions/cache@v4
7253 with :
7354 path : ~/.cache/pip
74- key : ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt', 'skill_seeker_mcp/requirements.txt' ) }}
55+ key : ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
7556 restore-keys : |
7657 ${{ runner.os }}-pip-
77-
7858 - name : Install dependencies
7959 run : |
8060 python -m pip install --upgrade pip
8161 pip install -r requirements.txt
82- if [ -f skill_seeker_mcp/requirements.txt ]; then pip install -r skill_seeker_mcp/requirements.txt; fi
83- # Install package in editable mode for tests (required for src/ layout)
62+ pip install pytest-xdist pytest-timeout
8463 pip install -e .
85-
86- - name : Run CLI tests
87- run : |
88- python -m pytest tests/test_scraper_features.py -v
89- python -m pytest tests/test_config_validation.py -v
90- python -m pytest tests/test_integration.py -v
91-
92- - name : Run MCP server tests
64+ - name : Run fast tests (xdist parallel)
9365 run : |
94- python -m pytest tests/test_mcp_server.py -v
95-
96- - name : Generate coverage report
97- run : |
98- python -m pytest tests/ --ignore=tests/test_mcp_fastmcp.py --ignore=tests/test_mcp_server.py --ignore=tests/test_install_skill_e2e.py --cov=src/skill_seekers --cov-report=xml --cov-report=term
99- timeout-minutes : 30
100-
66+ python -m pytest tests/ -n auto --dist=loadfile \
67+ -m "not slow and not integration and not e2e and not network and not serial and not mcp_only" \
68+ -q --timeout=120 --cov=src/skill_seekers --cov-report=xml --cov-report=term
69+ timeout-minutes : 15
10170 - name : Upload coverage to Codecov
10271 uses : codecov/codecov-action@v4
10372 with :
@@ -106,14 +75,62 @@ jobs:
10675 name : codecov-umbrella
10776 fail_ci_if_error : false
10877
109- # Summary job that provides a single status check for branch protection.
110- # The job name MUST match the required status check in the branch
111- # protection rules. GitHub reports status checks using job names
112- # (not the workflow name), so the required check "Tests" will only
113- # be satisfied if a job with exactly that name exists and succeeds.
78+ test-serial :
79+ name : Serial / Integration / E2E Tests
80+ runs-on : ubuntu-latest
81+ needs : [test-fast]
82+ steps :
83+ - uses : actions/checkout@v4
84+ with :
85+ submodules : recursive
86+ - name : Set up Python 3.12
87+ uses : actions/setup-python@v5
88+ with :
89+ python-version : ' 3.12'
90+ - name : Install dependencies
91+ run : |
92+ python -m pip install --upgrade pip
93+ pip install -r requirements.txt
94+ pip install pytest-timeout
95+ pip install -e .
96+ - name : Run serial/integration/E2E tests
97+ run : |
98+ python -m pytest tests/ \
99+ --ignore=tests/test_bootstrap_skill_e2e.py \
100+ --ignore=tests/test_bootstrap_skill.py \
101+ -m "(integration or e2e or slow or network or serial) and not mcp_only" \
102+ -v --timeout=300
103+ timeout-minutes : 25
104+
105+ test-mcp :
106+ name : MCP Server Tests
107+ runs-on : ubuntu-latest
108+ needs : [test-fast]
109+ steps :
110+ - uses : actions/checkout@v4
111+ with :
112+ submodules : recursive
113+ - name : Set up Python 3.12
114+ uses : actions/setup-python@v5
115+ with :
116+ python-version : ' 3.12'
117+ - name : Install dependencies
118+ run : |
119+ python -m pip install --upgrade pip
120+ pip install -r requirements.txt
121+ pip install pytest-timeout
122+ pip install -e ".[mcp]"
123+ pip install -e .
124+ - name : Run MCP tests
125+ run : |
126+ python -m pytest tests/ \
127+ -m "mcp_only and not network" \
128+ -v --timeout=180
129+ timeout-minutes : 10
130+
114131 tests-complete :
115132 name : Tests
116- needs : [lint, test]
133+ needs : [lint, test-fast, test-serial, test-mcp ]
117134 runs-on : ubuntu-latest
118135 if : always()
119136 steps :
@@ -123,8 +140,16 @@ jobs:
123140 echo "❌ Code quality checks failed!"
124141 exit 1
125142 fi
126- if [ "${{ needs.test.result }}" != "success" ]; then
127- echo "❌ Tests failed!"
143+ if [ "${{ needs.test-fast.result }}" != "success" ]; then
144+ echo "❌ Fast tests failed!"
145+ exit 1
146+ fi
147+ if [ "${{ needs.test-serial.result }}" == "failure" ]; then
148+ echo "❌ Serial/integration tests failed!"
149+ exit 1
150+ fi
151+ if [ "${{ needs.test-mcp.result }}" == "failure" ]; then
152+ echo "❌ MCP tests failed!"
128153 exit 1
129154 fi
130155 echo "✅ All checks passed!"
0 commit comments