Skip to content

ci: extend test matrix to 2 latest Weaviate versions #1170

ci: extend test matrix to 2 latest Weaviate versions

ci: extend test matrix to 2 latest Weaviate versions #1170

Workflow file for this run

name: Tests

Check failure on line 1 in .github/workflows/test.yaml

View workflow run for this annotation

GitHub Actions / .github/workflows/test.yaml

Invalid workflow file

(Line: 16, Col: 21): Unrecognized named-value: 'env'. Located at position 1 within expression: env.IMG2VEC, (Line: 62, Col: 27): Unrecognized named-value: 'env'. Located at position 10 within expression: fromJson(env.SUPPORTED_VERSIONS), (Line: 62, Col: 27): Unexpected value '${{ fromJson(env.SUPPORTED_VERSIONS) }}'
on:
push:
branches:
- main
pull_request:
concurrency:
group: tests-${{ github.ref }}
cancel-in-progress: true
env:
IMG2VEC: cr.weaviate.io/semitechnologies/img2vec-pytorch:resnet50
MINIO: minio/minio:latest
MODEL2VEC: cr.weaviate.io/semitechnologies/model2vec-inference:minishlab-potion-retrieval-32M
SUPPORTED_VERSIONS: '["1.32.0", "1.33.0"]'
DOCKER_CACHE_KEY: docker-images-${{ env.IMG2VEC }}-${{ env.MINIO }}-${{ env.MODEL2VEC }}
DOCKER_IMAGES_TAR: docker-images.tar
jobs:
docker-cache:
name: Cache shared Docker images
runs-on: ubuntu-latest
steps:
- name: Login to Docker Hub
if: ${{ !github.event.pull_request.head.repo.fork }}
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Restore and update Docker cache
id: docker-cache-restore
uses: actions/cache@v4
with:
path: ${{ env.DOCKER_IMAGES_TAR }}
key: ${{ env.DOCKER_CACHE_KEY }}
- name: Pull images
if: steps.docker-cache-restore.outputs.cache-hit != 'true'
run: |
docker pull $IMG2VEC
docker pull $MINIO
docker pull $MODEL2VEC
docker save $IMG2VEC $MINIO $MODEL2VEC -o $DOCKER_IMAGES_TAR
maven-cache:
name: Cache Maven dependencies
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '17'
cache: 'maven'
- run: mvn dependency:go-offline
test:
name: Test
runs-on: ubuntu-latest
needs: [ docker-cache, maven-cache]
strategy:
matrix:
WEAVIATE_VERSION: ${{ fromJson(env.SUPPORTED_VERSIONS) }}
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: ${{ env.DOCKER_IMAGES_TAR }}
key: ${{ env.DOCKER_CACHE_KEY }}
- name: Load Docker images
run: |
if [ -f $DOCKER_IMAGES_TAR ]; then
docker load -i $DOCKER_IMAGES_TAR
fi
- uses: actions/setup-java@v4
name: Setup JDK
with:
distribution: 'zulu'
java-version: '17'
cache: 'maven'
- name: Run Tests (v${{ matrix.WEAVIATE_VERSION }})
env:
OKTA_DUMMY_CI_PW: ${{ secrets.OKTA_DUMMY_CI_PW }}
WCS_DUMMY_CI_PW: ${{ secrets.WCS_DUMMY_CI_PW }}
OKTA_CLIENT_SECRET: ${{ secrets.OKTA_CLIENT_SECRET }}
AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }}
OPENAI_APIKEY: ${{ secrets.OPENAI_APIKEY }}
WEAVIATE_VERSION: ${{ matrix.WEAVIATE_VERSION }}
run: mvn verify