Skip to content

Commit

Permalink
chore: add target for individual e2e tests (#6009)
Browse files Browse the repository at this point in the history
Support running individual e2e tests like `earthly
./yarn-project/end-to-end/+e2e-test-single --test=e2e_fees`
  • Loading branch information
just-mitch committed Apr 24, 2024
1 parent 3b91791 commit e2842a6
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 11 deletions.
57 changes: 46 additions & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
workflow_dispatch:
inputs:
username:
description: 'Defaults to GitHub Actor'
description: "Defaults to GitHub Actor"
required: false
runner_action:
description: "The action to take with the self-hosted runner (start, stop, restart)."
Expand Down Expand Up @@ -34,7 +34,10 @@ jobs:
outputs:
e2e_list: ${{ steps.e2e_list.outputs.list }}
steps:
- {uses: actions/checkout@v4, with: { ref: "${{ github.event.pull_request.head.sha }}"}}
- {
uses: actions/checkout@v4,
with: { ref: "${{ github.event.pull_request.head.sha }}" },
}
- uses: ./.github/ci-setup-action
with:
dockerhub_password: "${{ secrets.DOCKERHUB_PASSWORD }}"
Expand All @@ -47,7 +50,7 @@ jobs:
# (Note ARM uses just 2 tests as a smoketest)
- name: Create list of end-to-end jobs
id: e2e_list
run: echo "list=$(earthly ls ./yarn-project/end-to-end | grep -v '+base' | sed 's/+//' | jq -R . | jq -cs .)" >> $GITHUB_OUTPUT
run: echo "list=$(earthly ls ./yarn-project/end-to-end | grep -v -E '(\+base)|(\+e2e-test-single)' | sed 's/+//' | jq -R . | jq -cs .)" >> $GITHUB_OUTPUT

# all the end-to-end integration tests for aztec
e2e:
Expand All @@ -58,7 +61,10 @@ jobs:
matrix:
test: ${{ fromJson( needs.build.outputs.e2e_list )}}
steps:
- {uses: actions/checkout@v4, with: { ref: "${{ github.event.pull_request.head.sha }}"}}
- {
uses: actions/checkout@v4,
with: { ref: "${{ github.event.pull_request.head.sha }}" },
}
- uses: ./.github/ci-setup-action
with:
dockerhub_password: "${{ secrets.DOCKERHUB_PASSWORD }}"
Expand All @@ -78,7 +84,10 @@ jobs:
needs: setup
runs-on: ${{ inputs.username || github.actor }}-x86
steps:
- {uses: actions/checkout@v4, with: { ref: "${{ github.event.pull_request.head.sha }}"}}
- {
uses: actions/checkout@v4,
with: { ref: "${{ github.event.pull_request.head.sha }}" },
}
# Only allow one memory-hunger prover test to use this runner
- uses: ./.github/ci-setup-action
with:
Expand All @@ -95,7 +104,10 @@ jobs:
needs: setup
runs-on: ${{ github.actor }}-x86
steps:
- {uses: actions/checkout@v4, with: { ref: "${{ github.event.pull_request.head.sha }}"}}
- {
uses: actions/checkout@v4,
with: { ref: "${{ github.event.pull_request.head.sha }}" },
}
# Only allow one memory-hunger prover test to use this runner
- uses: ./.github/ci-setup-action
with:
Expand All @@ -109,7 +121,10 @@ jobs:
needs: setup
runs-on: ${{ github.actor }}-x86
steps:
- {uses: actions/checkout@v4, with: { ref: "${{ github.event.pull_request.head.sha }}"}}
- {
uses: actions/checkout@v4,
with: { ref: "${{ github.event.pull_request.head.sha }}" },
}
# Only allow one memory-hunger prover test to use this runner
- uses: ./.github/ci-setup-action
with:
Expand All @@ -124,7 +139,10 @@ jobs:
needs: setup
runs-on: ${{ inputs.username || github.actor }}-x86
steps:
- {uses: actions/checkout@v4, with: { ref: "${{ github.event.pull_request.head.sha }}"}}
- {
uses: actions/checkout@v4,
with: { ref: "${{ github.event.pull_request.head.sha }}" },
}
- uses: ./.github/ci-setup-action
with:
dockerhub_password: "${{ secrets.DOCKERHUB_PASSWORD }}"
Expand All @@ -151,7 +169,10 @@ jobs:
runs-on: ${{ inputs.username || github.actor }}-bench-x86
needs: setup-bench
steps:
- {uses: actions/checkout@v4, with: { ref: "${{ github.event.pull_request.head.sha }}"}}
- {
uses: actions/checkout@v4,
with: { ref: "${{ github.event.pull_request.head.sha }}" },
}
- uses: ./.github/ci-setup-action
with:
dockerhub_password: "${{ secrets.DOCKERHUB_PASSWORD }}"
Expand All @@ -169,12 +190,26 @@ jobs:

merge-check:
runs-on: ubuntu-latest
needs: [e2e, bb-native-tests, bb-bench, yarn-project-formatting, yarn-project-test]
needs:
[
e2e,
bb-native-tests,
bb-bench,
yarn-project-formatting,
yarn-project-test,
]
steps:
- run: echo Pull request merging now allowed.

notify:
needs: [e2e, bb-native-tests, bb-bench, yarn-project-formatting, yarn-project-test]
needs:
[
e2e,
bb-native-tests,
bb-bench,
yarn-project-formatting,
yarn-project-test,
]
runs-on: ubuntu-latest
if: ${{ github.ref == 'refs/heads/master' && failure() }}
steps:
Expand Down
5 changes: 5 additions & 0 deletions yarn-project/end-to-end/Earthfile
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,11 @@ e2e-tests:
FROM ../+end-to-end
RUN yarn test ./src/e2e

e2e-test-single:
ARG test
FROM ../+end-to-end
RUN yarn test $test

flakey-e2e-tests:
FROM ../+end-to-end
RUN yarn test --passWithNoTests ./src/flakey || true
Expand Down

0 comments on commit e2842a6

Please sign in to comment.