chore(github): improve public repository credibility #392
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Pytest CI | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| workflow_dispatch: | |
| env: | |
| FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true | |
| permissions: | |
| contents: read | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.12.3' | |
| cache: pip | |
| - name: Install minimal test dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -r requirements-ci.txt | |
| - name: Verify runtime imports | |
| run: | | |
| python - <<'PY' | |
| import importlib | |
| modules = [ | |
| 'numpy', | |
| 'pandas', | |
| 'sklearn', | |
| 'indicators', | |
| 'lstm_model', | |
| 'signal_generator', | |
| ] | |
| for name in modules: | |
| importlib.import_module(name) | |
| print('Import check OK') | |
| PY | |
| - name: Run tests | |
| env: | |
| PYTHONPATH: . | |
| run: pytest -q | |
| quality: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.12.3' | |
| - name: Install quality dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -r requirements-ci.txt | |
| - name: Run black | |
| run: black --check . | |
| - name: Run flake8 | |
| run: flake8 . | |
| - name: Run mypy | |
| run: mypy . |