GitHub Actions

The inboxdome/email-testing-action gives your CI three steps:create an inbox, wait for an email/OTP, andassert on what arrived. Store your API key as theINBOXDOME_API_KEY repository secret.

jobs:
  signup-email-test:
    runs-on: ubuntu-latest
    steps:
      - name: Create inbox
        id: inbox
        uses: inboxdome/email-testing-action@v1
        with:
          api-key: ${{ secrets.INBOXDOME_API_KEY }}
          mode: create

      - name: Sign up with the temporary address
        run: ./scripts/signup.sh "${{ steps.inbox.outputs.email-address }}"

      - name: Wait for the OTP
        id: otp
        uses: inboxdome/email-testing-action@v1
        with:
          api-key: ${{ secrets.INBOXDOME_API_KEY }}
          mode: wait
          inbox-id: ${{ steps.inbox.outputs.inbox-id }}
          wait-for: otp
          timeout-seconds: 90

      - name: Verify the account with the code
        run: ./scripts/verify.sh "${{ steps.otp.outputs.otp }}"

      - name: Assert on the welcome email
        uses: inboxdome/email-testing-action@v1
        with:
          api-key: ${{ secrets.INBOXDOME_API_KEY }}
          mode: assert
          inbox-id: ${{ steps.inbox.outputs.inbox-id }}
          assertions: >-
            [{"type":"containsText","text":"Welcome"},
             {"type":"linkResponds","urlContains":"verify"},
             {"type":"auth","check":"dkim"}]

Modes

ModeInputsOutputs
createdomain?, ttl-seconds?inbox-id, email-address
waitinbox-id, wait-for, timeout-secondsotp, message-id, message-subject
assertinbox-id, assertions (JSON), fail-on-assertion-failurepassed, report

Prefer plain HTTP? The action is a thin curl wrapper over theREST API — everything works with two curl calls too.

API reference →