chore: check for ACK Messages removed #21
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: CI | |
on: | |
push: | |
branches: [main] | |
tags: | |
- '*' | |
pull_request: | |
branches: [main] | |
jobs: | |
build: | |
name: aws-sqs-source-go | |
runs-on: ubuntu-latest | |
services: | |
goaws: | |
image: motoserver/moto | |
ports: | |
- 5000:5000 | |
timeout-minutes: 10 | |
env: | |
GOPATH: /home/runner/go | |
steps: | |
- name: "Step 1: Checkout repository" | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: '0' | |
- name: "Step 2: Run prerequisite steps" | |
run: | | |
echo "IMAGE_TAG=$(git describe --tags --always)" >> $GITHUB_ENV | |
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.55.0 | |
- name: "Step 3: Setup Golang" | |
uses: actions/[email protected] | |
with: | |
go-version: '1.21' | |
- name: "Step 4: Restore Go build cache" | |
uses: actions/cache@v3 | |
with: | |
path: ~/.cache/go-build | |
key: ${{ runner.os }}-go-build-v1-${{ github.run_id }} | |
- name: "Step 5: Run Lint" | |
run: make lint | |
- name: "Step 6: Run unit Tests" | |
run: make test | |
- name: "Step 7: Build and create docker image" | |
run: make image | |
env: | |
TAG: ${{ env.IMAGE_TAG }} | |
- name: "Step 8: Docker Login" | |
if: startsWith(github.ref, 'refs/tags/v') | |
uses: docker/login-action@v2 | |
with: | |
registry: quay.io | |
username: ${{ secrets.QUAYIO_USERNAME }} | |
password: ${{ secrets.QUAYIO_PASSWORD }} | |
- name: "Step 9: Build docker image" | |
if: startsWith(github.ref, 'refs/tags/v') | |
run: docker push "quay.io/numaio/numaflow-go/aws-sqs-source-go:${{env.IMAGE_TAG}}" | |
- name: "Step 10: Store docker image" | |
run: | | |
docker tag "quay.io/numaio/numaflow-go/aws-sqs-source-go:${{env.IMAGE_TAG}}" "quay.io/numaio/numaflow-go/aws-sqs-source-go:sqs-source" | |
docker save -o /tmp/aws-sqs-queue-image.tar "quay.io/numaio/numaflow-go/aws-sqs-source-go:sqs-source" | |
- name: "Step 11: Upload docker artifact" | |
uses: actions/upload-artifact@v3 | |
with: | |
name: aws-sqs-queue | |
path: /tmp/aws-sqs-queue-image.tar | |
e2e: | |
name: Run E2E test | |
needs: | |
- build # Corrected from 'build' to 'aws-sqs-source-go' | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
env: | |
GOPATH: /home/runner/go | |
steps: | |
- name: "Step 1: Checkout repository" | |
uses: actions/checkout@v3 | |
- name: "Step 2: Download docker artifact" | |
uses: actions/download-artifact@v3 | |
with: | |
name: aws-sqs-queue | |
path: /tmp | |
- name: "Step 3: Setup Golang" | |
uses: actions/[email protected] | |
with: | |
go-version: '1.21' | |
- name: "step 4: Add bins to PATH" | |
run: | | |
echo /home/runner/go/bin >> $GITHUB_PATH | |
echo /usr/local/bin >> $GITHUB_PATH | |
- name: "Step 5: Install k3d" | |
run: curl -s https://raw.githubusercontent.com/k3d-io/k3d/main/install.sh | bash | |
- name: "Step 6: Create a registry and a cluster" | |
run: | | |
k3d registry create e2e-registry --port 5111 | |
k3d cluster create e2e --registry-use k3d-e2e-registry:5111 | |
k3d kubeconfig get e2e > ~/.kube/numaflow-e2e-config | |
echo '127.0.0.1 k3d-e2e-registry' | sudo tee -a /etc/hosts | |
- name: "Step 7: Load image in cluster" | |
run: | | |
docker load --input /tmp/aws-sqs-queue-image.tar | |
k3d image import "quay.io/numaio/numaflow-go/aws-sqs-source-go:sqs-source" --cluster e2e | |
- name: "Step 8: Install Numaflow" | |
run: KUBECONFIG=~/.kube/numaflow-e2e-config make install-numaflow | |
- name: "step 9: Run E2E tests" | |
run: KUBECONFIG=~/.kube/numaflow-e2e-config make test-e2e |