Skip to content

Nightly Tests

Nightly Tests #109

Workflow file for this run

name: Nightly Tests
on:
schedule:
# run nightly at 2 AM UTC
- cron: '0 2 * * *'
# Allow manual triggering for testing
workflow_dispatch:
inputs:
tag:
description: 'Docker image tag to test (leave empty to use commit SHA)'
required: false
type: string
jobs:
test-state-sync-mocha:
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- name: Checkout code
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 #v5.0.0
- name: Set up Go
uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 #v6.0.0
with:
go-version-file: "go.mod"
- name: Generate image tag
id: tag
run: |
if [ -n "${{ inputs.tag }}" ]; then
echo "value=${{ inputs.tag }}" >> $GITHUB_OUTPUT
else
echo "value=$(echo $GITHUB_SHA | cut -c1-8)" >> $GITHUB_OUTPUT
fi
- name: Build Docker image locally
if: ${{ !inputs.tag }} # only build an image if no tag is specified
run: docker build -t "ghcr.io/celestiaorg/celestia-app:${{ steps.tag.outputs.value }}" . -f docker/multiplexer.Dockerfile
- name: Run TestStateSyncMocha
env:
# Use the locally built image
CELESTIA_IMAGE: ghcr.io/celestiaorg/celestia-app
CELESTIA_TAG: ${{ steps.tag.outputs.value }}
run: make test-docker-e2e test=TestStateSyncMocha
test-all-upgrades:
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- name: Checkout code
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 #v5.0.0
- name: Set up Go
uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 #v6.0.0
with:
go-version-file: "go.mod"
- name: Generate image tag
id: tag
run: |
if [ -n "${{ inputs.tag }}" ]; then
echo "value=${{ inputs.tag }}" >> $GITHUB_OUTPUT
else
echo "value=$(echo $GITHUB_SHA | cut -c1-8)" >> $GITHUB_OUTPUT
fi
- name: Build Docker image locally
if: ${{ !inputs.tag }} # only build an image if no tag is specified
run: docker build -t "ghcr.io/celestiaorg/celestia-app:${{ steps.tag.outputs.value }}" . -f docker/multiplexer.Dockerfile
- name: Run TestAllUpgrades
env:
# Use the locally built image
CELESTIA_IMAGE: ghcr.io/celestiaorg/celestia-app
CELESTIA_TAG: ${{ steps.tag.outputs.value }}
run: make test-docker-e2e test=TestAllUpgrades
notify-slack-on-failure:
name: Notify Slack on failure
runs-on: ubuntu-latest
needs: [test-state-sync-mocha, test-all-upgrades]
if: ${{ always() && (needs.test-state-sync-mocha.result == 'failure' || needs.test-all-upgrades.result == 'failure') }}
steps:
- name: Slack Notification
uses: slackapi/[email protected]
with:
webhook: ${{ secrets.SLACK_WEBHOOK_URL }}
webhook-type: incoming-webhook
payload: |
{
"text": "test-nightly tests failed: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
}