Skip to content

chore(main): release 0.38.5 (#778) #1751

chore(main): release 0.38.5 (#778)

chore(main): release 0.38.5 (#778) #1751

name: Integration Test
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
integration-test:
name: Integration Test
runs-on: ubuntu-latest
steps:
- name: Maximize build space
uses: easimon/maximize-build-space@master
with:
root-reserve-mb: 5120
remove-dotnet: "true"
remove-android: "true"
remove-haskell: "true"
remove-codeql: "true"
remove-docker-images: "true"
build-mount-path: "/var/lib/docker"
- name: Restart docker
run: sudo service docker restart
- name: Checkout (model-backend)
uses: actions/checkout@v4
with:
repository: instill-ai/model-backend
ref: ${{ github.event.pull_request.head.sha }}
path: model-backend
- name: Load .env file (model-backend)
uses: cardinalby/export-env-action@v2
with:
envFile: ./model-backend/.env
- name: Checkout (instill-core)
uses: actions/checkout@v4
with:
repository: instill-ai/instill-core
ref: main
path: instill-core
- name: Load .env file (instill-core)
uses: cardinalby/export-env-action@v2
with:
envFile: ./instill-core/.env
- uses: actions/setup-go@v5
with:
go-version: ${{ env.GOLANG_VERSION }}
- name: Install k6
run: |
go install go.k6.io/xk6/cmd/xk6@v${{ env.XK6_VERSION }}
xk6 build v${{ env.K6_VERSION }} \
--with github.com/grafana/xk6-sql@v${{ env.XK6_SQL_VERSION }} \
--with github.com/grafana/xk6-sql-driver-postgres@v${{ env.XK6_SQL_POSTGRES_VERSION }} && sudo cp k6 /usr/bin
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: dropletbot
password: ${{ secrets.BOTDOCKERHUBPERSONALACCESSTOKEN }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Set short commit SHA
if: github.ref == 'refs/heads/main'
run: |
echo "COMMIT_SHORT_SHA=${GITHUB_SHA:0:7}" >> $GITHUB_ENV
- name: Set PR head commit SHA
if: github.event_name == 'pull_request'
run: |
echo "COMMIT_SHORT_SHA=$(echo ${{ github.event.pull_request.head.sha }} | cut -c1-7)" >> $GITHUB_ENV
- name: Build image
uses: docker/build-push-action@v6
with:
context: model-backend
load: true
build-args: |
SERVICE_NAME=${{ env.SERVICE_NAME }}
SERVICE_VERSION=${{ env.COMMIT_SHORT_SHA }}
tags: instill/model-backend:${{ env.COMMIT_SHORT_SHA }}
cache-from: |
type=registry,ref=instill/model-backend:buildcache
cache-to: |
type=registry,ref=instill/model-backend:buildcache,mode=max
- name: Launch Instill Core CE (commit hash)
working-directory: instill-core
run: |
make compose-dev EDITION=docker-ce:test ENV_SECRETS_COMPONENT=.env.secrets.component.test MODEL_BACKEND_VERSION=${{ env.COMMIT_SHORT_SHA }}
- name: Run integration-test
working-directory: model-backend
run: |
make integration-test API_GATEWAY_URL=localhost:8080
- name: Tear down Instill Core CE
if: always()
working-directory: instill-core
run: |
make down