Skip to content

Commit

Permalink
fix: install xk6 on action
Browse files Browse the repository at this point in the history
  • Loading branch information
jvallesm committed Aug 30, 2024
1 parent bac9311 commit 3203777
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 3 deletions.
1 change: 1 addition & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# version
GOLANG_VERSION=1.22.5
XK6_VERSION=0.11.0

# service
SERVICE_NAME=pipeline-backend
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/integration-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,14 @@ jobs:
EDITION=local-ce:test \
docker compose -f docker-compose.yml -f docker-compose-latest.yml rm -f
- uses: actions/setup-go@v3
with:
go-version: ${{ env.GOLANG_VERSION }}

- name: Install k6
run: |
curl https://github.com/grafana/k6/releases/download/v${{ env.K6_VERSION }}/k6-v${{ env.K6_VERSION }}-linux-amd64.tar.gz -L | tar xvz --strip-components 1 && sudo cp k6 /usr/bin
- go install go.k6.io/xk6/cmd/xk6@v${{ env.XK6_VERSION }}
- xk6 build --with github.com/grafana/xk6-sql --output /usr/bin/k6
- name: Checkout (pipeline)
uses: actions/checkout@v3
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile.dev
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ WORKDIR /${SERVICE_NAME}

# -- install 3rd-party

ARG TARGETOS TARGETARCH
ARG TARGETOS TARGETARCH XK6_VERSION

# Install Python, create virtual environment, and install pdfplumber
RUN apt update && \
Expand Down Expand Up @@ -34,7 +34,7 @@ RUN npm install -g @opendocsg/pdf2md
RUN --mount=target=. --mount=type=cache,target=/root/.cache/go-build --mount=type=cache,target=/go/pkg GOOS=$TARGETOS GOARCH=$TARGETARCH go install github.com/cosmtrek/[email protected]

# k6
RUN go install go.k6.io/xk6/cmd/xk6@v0.11.0
RUN go install go.k6.io/xk6/cmd/xk6@v${XK6_VERSION}
RUN xk6 build --with github.com/grafana/xk6-sql --output /usr/bin/k6

# -- set up Go
Expand Down
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ build: ## Build dev docker image
@docker build \
--build-arg SERVICE_NAME=${SERVICE_NAME} \
--build-arg GOLANG_VERSION=${GOLANG_VERSION} \
--build-arg K6_VERSION=${K6_VERSION} \
-f Dockerfile.dev -t instill/${SERVICE_NAME}:dev .

.PHONY: run-dev-services
Expand Down

0 comments on commit 3203777

Please sign in to comment.