Fix Temporal Decay #10
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: CI | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| workflow_dispatch: | |
| jobs: | |
| lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - name: Install Poetry | |
| run: pip install poetry | |
| - name: Configure Poetry to use in-project venv | |
| run: poetry config virtualenvs.in-project true | |
| - name: Cache dependencies | |
| uses: actions/cache@v4 | |
| with: | |
| path: .venv | |
| key: venv-${{ runner.os }}-${{ hashFiles('poetry.lock') }} | |
| - name: Install dependencies | |
| run: poetry install | |
| - name: Lint (ruff) | |
| run: poetry run ruff check memweave/ | |
| - name: Format check (black) | |
| run: poetry run black --check memweave/ | |
| - name: Type check (mypy) | |
| run: poetry run mypy memweave/ | |
| unit-tests: | |
| runs-on: ubuntu-latest | |
| needs: lint | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - name: Install Poetry | |
| run: pip install poetry | |
| - name: Configure Poetry to use in-project venv | |
| run: poetry config virtualenvs.in-project true | |
| - name: Cache dependencies | |
| uses: actions/cache@v4 | |
| with: | |
| path: .venv | |
| key: venv-${{ runner.os }}-${{ hashFiles('poetry.lock') }} | |
| - name: Install dependencies | |
| run: poetry install | |
| - name: Unit tests | |
| run: poetry run pytest tests/unit/ --tb=short --cov=memweave --cov-report=term-missing --cov-report=xml --cov-fail-under=70 | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| files: coverage.xml | |
| fail_ci_if_error: false |