Skip to content

reducing image and env #3

reducing image and env

reducing image and env #3

name: 🧪 Integration Tests
on:
push:
branches:
- '*'
jobs:
integration_tests:
name: Running integration tests, which require an Argilla instance running
runs-on: ubuntu-latest
services:
search-engine:
image: docker.elastic.co/elasticsearch/elasticsearch:8.8.2
ports:
- 6900:6900
env: '{"discovery.type": "single-node", "xpack.security.enabled": "false"}'

Check failure on line 17 in .github/workflows/integration-tests.yml

View workflow run for this annotation

GitHub Actions / 🧪 Integration Tests

Invalid workflow file

The workflow is not valid. .github/workflows/integration-tests.yml (Line: 17, Col: 14): Unexpected value '{"discovery.type": "single-node", "xpack.security.enabled": "false"}' .github/workflows/integration-tests.yml: Input string was not in a correct format.
defaults:
run:
shell: bash -l {0}
steps:
- name: Checkout Code 🛎
uses: actions/checkout@v3
- name: Setup Conda Env 🐍
uses: conda-incubator/setup-miniconda@v2
with:
miniforge-variant: Mambaforge
miniforge-version: latest
use-mamba: true
activate-environment: argilla
- name: Get date for conda cache
id: get-date
run: echo "::set-output name=today::$(/bin/date -u '+%Y%m%d')"
shell: bash
- name: Cache Conda env
uses: actions/cache@v3
id: cache
with:
path: ${{ env.CONDA }}/envs
key: conda-${{ runner.os }}--${{ runner.arch }}--${{ steps.get-date.outputs.today }}-${{ hashFiles('environment_dev.yml') }}-${{ env.CACHE_NUMBER }}
- name: Update environment
if: steps.cache.outputs.cache-hit != 'true'
run: mamba env update -n argilla -f environment_dev.yml
- name: Cache pip 👜
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ env.CACHE_NUMBER }}-${{ hashFiles('pyproject.toml') }}
- name: Set Argilla search engine env variable
if: startsWith(inputs.searchEngineDockerImage, 'docker.elastic.co')
run: |
echo "ARGILLA_SEARCH_ENGINE=elasticsearch" >> "$GITHUB_ENV"
echo "Configure elasticsearch engine"
- name: Set Argilla search engine env variable
if: startsWith(inputs.searchEngineDockerImage, 'opensearchproject')
run: |
echo "ARGILLA_SEARCH_ENGINE=opensearch" >> "$GITHUB_ENV"
echo "Configure opensearch engine"
- name: Launch Argilla Server
env:
ARGILLA_ENABLE_TELEMETRY: 0
run: |
pip install -e ".[server]"
python -m argilla server database migrate
python -m argilla server database users create_default
python -m argilla server start &
- name: Run end2end examples 📈
env:
ARGILLA_ENABLE_TELEMETRY: 0
run: |
pip install pytest
pytest tests