add an app test for discovery (#423) #2067
This file contains hidden or 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: main | |
| on: | |
| workflow_dispatch: | |
| pull_request: | |
| push: | |
| branches: | |
| - main | |
| concurrency: | |
| group: maru-main-workflow-${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} | |
| jobs: | |
| filter-commit-changes: | |
| runs-on: [gha-runner-scale-set-ubuntu-22.04-amd64-small] | |
| name: Filter commit changes | |
| outputs: | |
| has-changes-requiring-build: ${{ steps.filter.outputs.has-changes-requiring-build }} | |
| chaos-tests-changes: ${{ steps.filter.outputs.chaos-tests-changes }} | |
| run-chaos-tests: ${{ steps.filter.outputs.has-changes-requiring-build == 'true' || steps.filter.outputs.chaos-tests-changes == 'true' }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Filter commit changes | |
| uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 #v3.0.2 | |
| id: filter | |
| with: | |
| base: ${{ github.ref }} | |
| list-files: "json" | |
| filters: | | |
| has-changes-requiring-build: | |
| - '.github/**' | |
| - '**/src/**' | |
| - '**/Makefile' | |
| - 'docker/**' | |
| - 'gradle/**' | |
| - 'gradlew' | |
| - 'gradlew.bat' | |
| - '**/*.gradle' | |
| - '**/*.properties' | |
| chaos-tests-changes: | |
| - '.github/**' | |
| - 'chaos-testing/**' | |
| - name: Debug filter outputs | |
| run: | | |
| echo "has-changes-requiring-build: ${{ steps.filter.outputs.has-changes-requiring-build }}" | |
| echo "chaos-tests-changes: ${{ steps.filter.outputs.chaos-tests-changes }}" | |
| echo "run-chaos-tests: ${{ steps.filter.outputs.run-chaos-tests }}" | |
| echo "Event name: ${{ github.event_name }}" | |
| echo "Ref: ${{ github.ref }}" | |
| echo "All filter outputs: ${{ toJSON(steps.filter.outputs) }}" | |
| debug: | |
| name: Debug Filters outputs | |
| needs: [ filter-commit-changes ] | |
| runs-on: [ gha-runner-scale-set-ubuntu-22.04-amd64-small ] | |
| steps: | |
| - name: Debug filter outputs | |
| run: | | |
| echo "has-changes-requiring-build: ${{ needs.filter-commit-changes.outputs.has-changes-requiring-build }}" | |
| echo "chaos-tests-changes: ${{ needs.filter-commit-changes.outputs.chaos-tests-changes }}" | |
| echo "run-chaos-tests: ${{ needs.filter-commit-changes.outputs.run-chaos-tests }}" | |
| echo "Event name: ${{ github.event_name }}" | |
| echo "Ref: ${{ github.ref }}" | |
| testing: | |
| needs: [ filter-commit-changes ] | |
| if: ${{ always() && !cancelled() && needs.filter-commit-changes.outputs.has-changes-requiring-build == 'true' }} | |
| uses: ./.github/workflows/testing.yml | |
| with: | |
| consensus-client-changed: ${{ needs.filter-commit-changes.outputs.has-changes-requiring-build }} | |
| secrets: inherit | |
| # run-e2e-tests: | |
| # needs: [ filter-commit-changes ] | |
| # if: ${{ always() && !cancelled() && needs.filter-commit-changes.outputs.has-changes-requiring-build == 'true' }} | |
| # uses: ./.github/workflows/e2e-tests.yml | |
| # with: | |
| # e2e-tests-logs-dump: true | |
| # has-changes-requiring-build: ${{ needs.filter-commit-changes.outputs.has-changes-requiring-build }} | |
| # secrets: inherit | |
| chaos-testing: | |
| needs: [ filter-commit-changes ] | |
| if: ${{ always() && !cancelled() && needs.filter-commit-changes.outputs.run-chaos-tests == 'true' }} | |
| uses: ./.github/workflows/chaos-testing.yml | |
| with: | |
| consensus-client-changed: ${{ needs.filter-commit-changes.outputs.has-changes-requiring-build }} | |
| secrets: inherit | |
| build-for-testing: | |
| needs: [ filter-commit-changes ] | |
| if: ${{ always() && !cancelled() && needs.filter-commit-changes.outputs.has-changes-requiring-build == 'true' }} | |
| uses: ./.github/workflows/maru-build-and-publish.yml | |
| with: | |
| develop_tag: 'develop' | |
| image_name: 'consensys/maru' | |
| push_image: false | |
| secrets: inherit | |
| maru-image-smoke-test: | |
| needs: [ build-for-testing ] | |
| if: ${{ always() && !cancelled() && needs.filter-commit-changes.outputs.has-changes-requiring-build == 'true' }} | |
| uses: ./.github/workflows/smoke-tests.yml | |
| with: | |
| commit-tag: ${{ needs.build-for-testing.outputs.commit_tag }} | |
| secrets: inherit | |
| build-and-publish: | |
| needs: [ maru-image-smoke-test ] | |
| if: ${{ always() && !cancelled() && needs.maru-image-smoke-test.result == 'success' && (github.event_name == 'workflow_dispatch' || github.ref == 'refs/heads/main') }} | |
| uses: ./.github/workflows/maru-build-and-publish.yml | |
| with: | |
| develop_tag: 'develop' | |
| image_name: 'consensys/maru' | |
| push_image: true | |
| secrets: inherit |