Skip to content

Commit

Permalink
Test the pipelines
Browse files Browse the repository at this point in the history
  • Loading branch information
pkosiec committed Mar 7, 2024
1 parent 17acfff commit 082cc0d
Showing 1 changed file with 44 additions and 43 deletions.
87 changes: 44 additions & 43 deletions .github/workflows/branch-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
push:
branches:
- main
- fix-e2e-tests
repository_dispatch:
types: [ trigger-e2e-tests ]

Expand All @@ -30,52 +31,52 @@ jobs:
id: extract-version
run: |
IMAGE_VERSION=$(git rev-parse --short HEAD)
echo "versions={\"image-version\":[\"v9.99.9-dev\",\"0.0.0-${IMAGE_VERSION}\"]}" >> $GITHUB_OUTPUT
build:
if: github.event_name != 'repository_dispatch' # skip if triggered by repository_dispatch
needs: [extract-metadata]
strategy:
matrix: ${{ fromJson(needs.extract-metadata.outputs.versions) }}
runs-on: ubuntu-latest
env:
GO111MODULE: on
GOPATH: /home/runner/work/botkube
GOBIN: /home/runner/work/botkube/bin
DOCKER_CLI_EXPERIMENTAL: "enabled"
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
cache: true
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Docker Login
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Install GoReleaser
uses: goreleaser/goreleaser-action@v5
with:
install-only: true
version: latest
- name: Run GoReleaser
run: |
make release-snapshot
env:
ANALYTICS_API_KEY: ${{ secrets.ANALYTICS_API_KEY }}
GORELEASER_CURRENT_TAG: ${{ matrix.image-version }}
IMAGE_TAG: ${{ matrix.image-version }}
echo "versions={\"image-version\":[\"v9.99.9-dev\",\"0.0.0-ced876da\"]}" >> $GITHUB_OUTPUT
# build:
# if: github.event_name != 'repository_dispatch' # skip if triggered by repository_dispatch
# needs: [extract-metadata]
# strategy:
# matrix: ${{ fromJson(needs.extract-metadata.outputs.versions) }}
# runs-on: ubuntu-latest
# env:
# GO111MODULE: on
# GOPATH: /home/runner/work/botkube
# GOBIN: /home/runner/work/botkube/bin
# DOCKER_CLI_EXPERIMENTAL: "enabled"
# steps:
# - name: Checkout
# uses: actions/checkout@v4
# - name: Setup Go
# uses: actions/setup-go@v5
# with:
# go-version-file: 'go.mod'
# cache: true
# - name: Set up QEMU
# uses: docker/setup-qemu-action@v3
# - name: Docker Login
# uses: docker/login-action@v1
# with:
# registry: ghcr.io
# username: ${{ github.actor }}
# password: ${{ secrets.GITHUB_TOKEN }}
# - name: Install GoReleaser
# uses: goreleaser/goreleaser-action@v5
# with:
# install-only: true
# version: latest
# - name: Run GoReleaser
# run: |
# make release-snapshot
# env:
# ANALYTICS_API_KEY: ${{ secrets.ANALYTICS_API_KEY }}
# GORELEASER_CURRENT_TAG: ${{ matrix.image-version }}
# IMAGE_TAG: ${{ matrix.image-version }}

integration-tests:
if: github.event_name != 'repository_dispatch' # skip if triggered by repository_dispatch
name: Integration tests
runs-on: ubuntu-latest
needs: [ build ]
needs: [ extract-metadata ]
permissions:
contents: read
packages: read
Expand Down Expand Up @@ -210,7 +211,7 @@ jobs:
cli-migration-e2e:
name: CLI Migration E2E tests
runs-on: ubuntu-latest
needs: [ build ]
needs: [ extract-metadata ]
permissions:
contents: read
packages: read
Expand Down Expand Up @@ -290,7 +291,7 @@ jobs:
cloud-slack-dev-e2e:
name: Botkube Cloud Slack Dev E2E
runs-on: ubuntu-latest
needs: [ build ]
needs: [ extract-metadata ]
permissions:
contents: read
packages: read
Expand Down

0 comments on commit 082cc0d

Please sign in to comment.