-
-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #84 from ericmjl/knowledge-graph-example
pixi migration and git commit structuredbot change
- Loading branch information
Showing
9 changed files
with
12,068 additions
and
1,236 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,91 +12,77 @@ env: | |
jobs: | ||
run-tests: | ||
runs-on: ubuntu-latest | ||
name: Run test suite (Python ${{ matrix.python-version }}, ${{ matrix.environment-type }}) | ||
name: Run test suite (Python ${{ matrix.python-version }}) | ||
|
||
strategy: | ||
matrix: | ||
python-version: [3.11] | ||
environment-type: ['miniconda', 'bare', 'pixi'] | ||
python-version: [3.11, 3.12] | ||
|
||
# https://github.com/marketplace/actions/setup-miniconda#use-a-default-shell | ||
defaults: | ||
run: | ||
shell: bash -l {0} | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
uses: actions/checkout@v4 | ||
|
||
- name: Download Ollama | ||
run: curl -fsSL https://ollama.com/install.sh | sh | ||
|
||
- name: Pull Microsoft's Phi3 model | ||
run: ollama pull phi3 | ||
|
||
- name: Setup Python environment | ||
if: matrix.environment-type == 'bare' | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Setup Micromamba Environment | ||
uses: mamba-org/setup-micromamba@v1 | ||
if: matrix.environment-type == 'miniconda' | ||
with: | ||
micromamba-version: '1.5.1-2' | ||
environment-file: environment.yml | ||
init-shell: >- | ||
bash | ||
cache-environment: true | ||
cache-environment-key: environment-${{ steps.date.outputs.date }}-${{ hashFiles('environment.yml') }} | ||
cache-downloads-key: downloads-${{ steps.date.outputs.date }}-${{ hashFiles('environment.yml') }} | ||
post-cleanup: 'all' | ||
|
||
- name: Setup Pixi Environment | ||
if: matrix.environment-type == 'pixi' && github.repository_owner == 'ericmjl' | ||
uses: prefix-dev/[email protected] | ||
with: | ||
pixi-version: v0.25.0 | ||
cache: true | ||
cache-write: ${{ github.event_name == 'push' && github.ref_name == 'main' }} | ||
auth-host: prefix.dev | ||
auth-token: ${{ secrets.PREFIX_DEV_TOKEN }} | ||
|
||
- name: Install dependencies | ||
if: matrix.environment-type == 'bare' | ||
# 17 June 2023: Figure out a way to move testing deps to the `pip install -e .` step below. | ||
run: | | ||
python -m pip install -e ".[all]" | ||
- name: Run tests (miniconda/bare) | ||
if: matrix.environment-type == 'miniconda' || matrix.environment-type == 'bare' | ||
run: | | ||
if [ "${{ matrix.environment-type }}" == "miniconda" ]; then | ||
conda activate llamabot | ||
fi | ||
pip install -e ".[all]" | ||
pytest | ||
|
||
- name: Run tests (pixi) | ||
if: matrix.environment-type == 'pixi' && github.repository_owner == 'ericmjl' | ||
run: | | ||
pixi run test | ||
- name: Test CLI (miniconda/bare) | ||
if: matrix.environment-type == 'bare' || matrix.environment-type == 'miniconda' | ||
run: | | ||
pip install -e ".[all]" | ||
llamabot --help | ||
- name: Test CLI (pixi) | ||
if: matrix.environment-type == 'pixi' && github.repository_owner == 'ericmjl' | ||
run: | | ||
pixi run llamabot | ||
# https://github.com/codecov/codecov-action | ||
- name: Upload code coverage | ||
uses: codecov/codecov-action@v2 | ||
with: | ||
# fail_ci_if_error: true # optional (default = false) | ||
verbose: true # optional (default = false) | ||
|
||
smoke-tests: | ||
runs-on: ubuntu-latest | ||
name: Run smoke tests (Python ${{ matrix.python-version }}) | ||
|
||
strategy: | ||
matrix: | ||
python-version: [3.11, 3.12] | ||
environment-type: ['pixi', 'bare'] | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Pixi Environment | ||
uses: prefix-dev/[email protected] | ||
if: ${{ matrix.environment-type == 'pixi' }} | ||
with: | ||
pixi-version: v0.25.0 | ||
cache: true | ||
cache-write: ${{ github.event_name == 'push' && github.ref_name == 'main' }} | ||
|
||
- name: Setup Python | ||
uses: actions/setup-python@v4 | ||
if: ${{ matrix.environment-type == 'bare' }} | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Test CLI (pixi) | ||
if: matrix.environment-type == 'pixi' && github.repository_owner == 'ericmjl' | ||
run: | | ||
pixi run llamabot-cli | ||
- name: Test CLI (bare) | ||
if: matrix.environment-type == 'bare' && github.repository_owner == 'ericmjl' | ||
run: | | ||
pip install . | ||
llamabot --help |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.