name: java-integration-tests-and-build on: push: branches: - master tags: - 'v*.*.*' jobs: build-docker-images: if: github.repository == 'feast-dev/feast' runs-on: ubuntu-latest strategy: matrix: component: [feature-server-java] env: MAVEN_CACHE: gs://feast-templocation-kf-feast/.m2.2020-08-19.tar REGISTRY: quay.io/feastdev-ci steps: - uses: actions/checkout@v4 with: submodules: 'true' - name: Setup Python uses: actions/setup-python@v5 id: setup-python with: python-version: "3.11" architecture: x64 - name: Authenticate to Google Cloud uses: 'google-github-actions/auth@v1' with: credentials_json: '${{ secrets.GCP_SA_KEY }}' - name: Set up gcloud SDK uses: google-github-actions/setup-gcloud@v1 with: project_id: ${{ secrets.GCP_PROJECT_ID }} - run: gcloud auth configure-docker --quiet - name: Get version run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV - name: Build image run: make build-${{ matrix.component }}-docker REGISTRY=${REGISTRY} VERSION=${GITHUB_SHA} - name: Login to Quay.io uses: docker/login-action@v3 with: registry: quay.io username: ${{ secrets.QUAYIO_CI_USERNAME }} password: ${{ secrets.QUAYIO_CI_TOKEN }} - name: Push image run: make push-${{ matrix.component }}-docker REGISTRY=${REGISTRY} VERSION=${GITHUB_SHA} - name: Push development Docker image run: | if [ ${GITHUB_REF#refs/*/} == "master" ]; then docker tag ${REGISTRY}/${{ matrix.component }}:${GITHUB_SHA} ${REGISTRY}/${{ matrix.component }}:develop docker push ${REGISTRY}/${{ matrix.component }}:develop fi lint-java: if: github.repository == 'feast-dev/feast' runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 with: submodules: 'true' - name: Lint java run: make lint-java unit-test-java: if: github.repository == 'feast-dev/feast' runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 with: submodules: 'true' - name: Set up JDK 11 uses: actions/setup-java@v1 with: java-version: '11' java-package: jdk architecture: x64 - uses: actions/cache@v4 with: path: ~/.m2/repository key: ${{ runner.os }}-it-maven-${{ hashFiles('**/pom.xml') }} restore-keys: | ${{ runner.os }}-it-maven- - uses: actions/cache@v4 with: path: ~/.m2/repository key: ${{ runner.os }}-ut-maven-${{ hashFiles('**/pom.xml') }} restore-keys: | ${{ runner.os }}-ut-maven- - name: Test java run: make test-java-with-coverage - uses: actions/upload-artifact@v4 with: name: java-coverage-report path: ${{ github.workspace }}/docs/coverage/java/target/site/jacoco-aggregate/ integration-test: if: github.repository == 'feast-dev/feast' runs-on: ubuntu-latest env: PYTHON: 3.11 steps: - uses: actions/checkout@v4 with: submodules: 'true' - name: Set up JDK 11 uses: actions/setup-java@v1 with: java-version: '11' java-package: jdk architecture: x64 - name: Setup Python (to call feast apply) uses: actions/setup-python@v5 id: setup-python with: python-version: 3.11 architecture: x64 - name: Install the latest version of uv uses: astral-sh/setup-uv@v5 with: enable-cache: true - name: Install Python dependencies run: make install-python-dependencies-ci - uses: actions/cache@v4 with: path: ~/.m2/repository key: ${{ runner.os }}-it-maven-${{ hashFiles('**/pom.xml') }} restore-keys: | ${{ runner.os }}-it-maven- - name: Authenticate to Google Cloud uses: 'google-github-actions/auth@v1' with: credentials_json: '${{ secrets.GCP_SA_KEY }}' - name: Set up gcloud SDK uses: google-github-actions/setup-gcloud@v1 with: project_id: ${{ secrets.GCP_PROJECT_ID }} - name: Use gcloud CLI run: gcloud info - name: Set up AWS SDK uses: aws-actions/configure-aws-credentials@v1 with: aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} aws-region: us-west-2 - name: Use AWS CLI run: aws sts get-caller-identity - name: Run integration tests run: make test-java-integration - name: Minimize uv cache run: uv cache prune --ci