run integration tests on all branches #62
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: 🧪 Integration Tests | |
on: | |
push: | |
branches: | |
- '**' | |
jobs: | |
integration_tests: | |
name: Running integration tests, which require an Argilla instance running | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
shell: bash -l {0} | |
strategy: | |
fail-fast: true | |
matrix: | |
python-version: ["3.9", "3.10", "3.11"] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: 🐍 Setup Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Cache | |
uses: actions/cache@v4 | |
id: cache | |
with: | |
path: ~/.cache/pip | |
key: ${{ runner.os }}-python-${{ env.pythonLocation }}-${{ hashFiles('pyproject.toml') }} | |
- name: Install `docker-compose` for local simulations | |
uses: KengoTODA/actions-setup-docker-compose@v1 | |
if: ${{ env.ACT }} | |
with: | |
version: '2.14.2' | |
- name: 🐳 Download Docker file | |
run: curl https://raw.githubusercontent.com/argilla-io/argilla/main/examples/deployments/docker/docker-compose.yaml -o docker-compose.yaml | |
- name: 🐳 Run docker-compose | |
run : docker-compose -f "docker-compose.yaml" up -d --build | |
- name: 🗃️ Install dependencies | |
if: steps.cache.outputs.cache-hit != 'true' | |
run: pip install -e ".[dev,tests]" | |
- name: 📈 Run tests | |
env: | |
ARGILLA_ENABLE_TELEMETRY: 0 | |
run: | | |
pytest tests |