Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/bare-metal-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ on:
jobs:
deploy:
runs-on: ${{ inputs.runs_on }}
concurrency:
group: ${{ inputs.cluster }}

outputs:
cluster_id: ${{ steps.deployment.outputs.cluster_id }}
Expand Down
45 changes: 38 additions & 7 deletions .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
name: Integration Tests

on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
pull_request

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
integration-test:
mock-deploy:
runs-on: ubuntu-latest
services:
docker:
Expand All @@ -34,3 +34,34 @@ jobs:
run: |
docker compose -f docker-compose-dev.yml logs
docker compose -f docker-compose-dev.yml down --volumes --remove-orphans

await-image:
name: Await docker image
runs-on: ubuntu-latest
steps:
- name: Wait for image to be built succeed
uses: lewagon/wait-on-check-action@v1.3.4
with:
ref: ${{ github.head_ref || github.ref_name }}
check-name: 'build'
repo-token: ${{ secrets.GITHUB_TOKEN }}
wait-interval: 10

deploy:
needs: [await-image, mock-deploy]
if: ${{ vars.ci_cluster != '' }}
uses: ./.github/workflows/bare-metal-deploy.yml
with:
runs_on: self-hosted
cluster: ${{ vars.ci_cluster }}
docker_image: public.ecr.aws/simply-block/simplyblock:${{ github.head_ref || github.ref_name }}
sbcli_source: ${{ github.repositoryUrl }}@${{ github.sha }}

test:
needs: deploy
uses: ./.github/workflows/api-test.yml
with:
runs_on: self-hosted
cluster_id: ${{ needs.deploy.outputs.cluster_id }}
cluster_ip: ${{ needs.deploy.outputs.cluster_ip }}
cluster_secret: ${{ needs.deploy.outputs.cluster_secret }}
Loading