feat(medcat): CU-869b09dk4 Update scripts download (#210) #28
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: cogstack-es - Test | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| paths: | |
| - 'cogstack-es/**' | |
| - '.github/workflows/cogstack-es**' | |
| defaults: | |
| run: | |
| working-directory: ./cogstack-es | |
| permissions: | |
| id-token: write | |
| jobs: | |
| types-only-with-ES-and-OS: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| strategy: | |
| matrix: | |
| python-version: [ '3.10', '3.11', '3.12', '3.13' ] | |
| max-parallel: 4 | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| python -m pip install ".[dev,OS,ES9]" | |
| - name: Check types | |
| run: | | |
| python -m mypy --follow-imports=normal src/cogstack | |
| types-lint-tests: | |
| runs-on: ubuntu-latest | |
| needs: types-only-with-ES-and-OS | |
| permissions: | |
| contents: read | |
| strategy: | |
| matrix: | |
| python-version: [ '3.10', '3.11', '3.12', '3.13' ] | |
| install-target: [ "ES9", "ES8", "OS", ] | |
| max-parallel: 4 | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| python -m pip install ".[dev,${{ matrix.install-target }}]" | |
| - name: Lint | |
| run: | | |
| ruff check src/cogstack | |
| - name: Test | |
| run: | | |
| pytest tests | |
| publish-to-test-PyPI: | |
| runs-on: ubuntu-latest | |
| needs: types-lint-tests | |
| steps: | |
| - name: Checkout main | |
| uses: actions/checkout@v5 | |
| with: | |
| fetch-depth: 0 # fetch all history | |
| fetch-tags: true # fetch tags explicitly | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: '3.10' | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| python -m pip install --upgrade build | |
| - name: Set timestamp-based dev version | |
| run: | | |
| TS=$(date -u +"%Y%m%d%H%M%S") | |
| echo "SETUPTOOLS_SCM_PRETEND_VERSION_FOR_COGSTACK_ES=0.1.1.dev${TS}" >> $GITHUB_ENV | |
| - name: Install package in development mode | |
| run: | | |
| pip install -e ".[dev,ES9,OS]" | |
| - name: Build package | |
| run: | | |
| python -m build | |
| - name: Publish distribution to TestPyPI | |
| uses: pypa/gh-action-pypi-publish@release/v1 | |
| with: | |
| repository_url: https://test.pypi.org/legacy/ | |
| packages_dir: cogstack-es/dist |