Skip to content

Integration tests

Integration tests #22

name: Integration tests
on:
push:
branches: [ "main" ]
workflow_dispatch:
inputs:
GIT_REF:
description: 'Commit hash to run the tests'
required: true
jobs:
build-quesma-docker-image:
uses: ./.github/workflows/build-quesma-docker-image.yml
with:
REF: ${{inputs.GIT_REF}}
integration-test-run:
runs-on: ubuntu-latest
needs: [build-quesma-docker-image]
steps:
- uses: actions/checkout@v4
with: ## @TODO REMOVE
ref: ${{ github.event.inputs.GIT_REF }}
- name: Set up Go
uses: actions/setup-go@v5
with:
cache-dependency-path: smoke-test/go.sum
go-version: '1.22'
- name: Download images
uses: actions/download-artifact@v4
with:
path: /tmp/images
- name: Load images
run: |
for file in /tmp/images/*/*.tar; do
docker load --input $file
done
docker image ls -a
- name: Set environment variable
run: echo "EXECUTING_ON_GITHUB_CI=true" >> $GITHUB_ENV
- name: Get last commit author
id: get_author
run: echo "::set-output name=author::$(git log -1 --pretty=format:'%an <%ae> sha1={%H}')"
- name: Run integration tests
working-directory: ci/it
run: go test -v
- name: Send Slack notification on failure
if: failure()
uses: slackapi/[email protected]
with:
channel-id: ${{ secrets.SLACK_CHANNEL_ID }}
slack-message: |
:exclamation: *Integration tests failed.* :exclamation: @channel
Last commit by: ${{ steps.get_author.outputs.author }}
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
- name: Send Slack notification on success
if: success()
uses: slackapi/[email protected]
with:
channel-id: ${{ secrets.SLACK_CHANNEL_ID }}
slack-message: |
:white_check_mark: *Integration tests passed.* Good job team!
Last commit by: ${{ steps.get_author.outputs.author }}
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}