[RPD-316] Add documentation for modular stacks and ensure usage is clear #1360
This file contains 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: CI | |
on: | |
workflow_call: | |
pull_request: | |
branches: | |
- main | |
- develop | |
- 'feature/*' | |
- 'hotfix/*' | |
- 'release/*' | |
- 'fixes/*' | |
push: | |
branches: | |
- main | |
- develop | |
- '**feature**' | |
jobs: | |
ci-tests: | |
name: Pytest CI | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ["3.8", "3.10"] | |
timeout-minutes: 15 | |
# disable zenml analytics logging for ci | |
env: | |
ZENML_ANALYTICS_OPT_IN: false | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
id: setup-python | |
with: | |
python-version: ${{ matrix.python-version }} | |
# The key configuration value here is `virtualenvs-in-project: true`: this creates the | |
# venv as a `.venv` in your testing directory, which allows the next step to easily | |
# cache it. | |
- uses: snok/install-poetry@v1 | |
with: | |
version: 1.3.1 | |
virtualenvs-create: true | |
virtualenvs-in-project: true | |
installer-parallel: true | |
- name: Spelling checker | |
uses: crate-ci/typos@master | |
with: | |
files: "." | |
config: ./.typos.toml | |
# Cache your dependencies (i.e. all the stuff in your `pyproject.toml`). | |
- name: Load cached venv | |
id: cached-poetry-dependencies | |
uses: actions/cache@v3 | |
with: | |
path: .venv | |
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }} | |
# Install dependencies if cache does not exist | |
- name: Install dependencies | |
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' | |
run: poetry install | |
- name: Run the full test suite | |
run: poetry run python -m pytest tests --cov |