Docker-compose smoke test #1088
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: Docker-compose smoke test | |
on: | |
schedule: | |
- cron: "0 23 * * *" | |
workflow_dispatch: | |
inputs: | |
nodeTag: | |
description: 'Node docker image tag' | |
required: true | |
default: '8.9.3' | |
walletTag: | |
description: 'Wallet docker image tag' | |
required: true | |
default: 'rc-latest' | |
branch: | |
description: 'Branch to checkout' | |
required: true | |
default: 'rc-latest' | |
jobs: | |
build: | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4.1.1 | |
with: | |
ref: ${{ github.event.inputs.branch || 'rc-latest'}} | |
- name: Check docker-compose | |
run: | | |
docker-compose up -d | |
mkdir logs | |
docker-compose logs > logs/docker-compose.log | |
docker-compose down | |
env: | |
NODE_TAG: ${{ github.event.inputs.nodeTag || '8.9.3'}} | |
WALLET_TAG: ${{ github.event.inputs.walletTag || 'rc-latest'}} | |
NETWORK: preprod | |
WALLET_DB: /tmp/wallet-db | |
NODE_DB: /tmp/node-db | |
WALLET_PORT: 8090 | |
- name: Save logs | |
uses: actions/upload-artifact@v3 | |
with: | |
name: logs | |
path: ./logs | |
report: | |
needs: [build] | |
if: always() | |
runs-on: ubuntu-latest | |
steps: | |
- name: Slack Notification on failure | |
if: needs.build.result == 'failure' | |
uses: rtCamp/action-slack-notify@v2 | |
env: | |
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }} | |
SLACK_ICON_EMOJI: ':poop:' | |
SLACK_USERNAME: 'GitHub Action' | |
SLACK_MESSAGE: | | |
*Job Link:* ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} | |
SLACK_COLOR: '#FF0000' | |
- name: Slack Notification on success | |
if: needs.build.result == 'success' | |
uses: rtCamp/action-slack-notify@v2 | |
env: | |
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }} | |
SLACK_ICON_EMOJI: ':rocket:' | |
SLACK_USERNAME: 'GitHub Action' | |
SLACK_MESSAGE: | | |
*Job Link:* ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} | |
SLACK_COLOR: '#00FF00' |