Skip to content

test(e2e): Run required E2E tests on PRs from forks #12791

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 8, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 12 additions & 13 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -913,8 +913,7 @@ jobs:
# - AND if the profiling node bindings were either successful or skipped
if: |
always() && needs.job_build.result == 'success' &&
(needs.job_compile_bindings_profiling_node.result == 'success' || needs.job_compile_bindings_profiling_node.result == 'skipped') &&
(github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository)
(needs.job_compile_bindings_profiling_node.result == 'success' || needs.job_compile_bindings_profiling_node.result == 'skipped')
Comment on lines -917 to +916
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the deleted check here is repeated in the optional e2e test step. So it should be fine to delete here as the "problematic" step is guarded already correctly.

needs: [job_get_metadata, job_build, job_compile_bindings_profiling_node]
runs-on: ubuntu-20.04-large-js
timeout-minutes: 15
Expand Down Expand Up @@ -996,7 +995,6 @@ jobs:
'angular-17',
'angular-18',
'aws-lambda-layer-cjs',
'cloudflare-astro',
'node-express',
'create-react-app',
'create-next-app',
Expand Down Expand Up @@ -1114,16 +1112,6 @@ jobs:
timeout-minutes: 5
run: pnpm test:assert

- name: Deploy Astro to Cloudflare
uses: cloudflare/pages-action@v1
if: matrix.test-application == 'cloudflare-astro'
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
projectName: ${{ secrets.CLOUDFLARE_PROJECT_NAME }}
directory: dist
workingDirectory: dev-packages/e2e-tests/test-applications/${{ matrix.test-application }}

job_optional_e2e_tests:
name: E2E ${{ matrix.label || matrix.test-application }} Test
# We only run E2E tests for non-fork PRs because the E2E tests require secrets to work and they can't be accessed from forks
Expand All @@ -1149,6 +1137,7 @@ jobs:
matrix:
test-application:
[
'cloudflare-astro',
'react-send-to-sentry',
'node-express-send-to-sentry',
'debug-id-sourcemaps',
Expand Down Expand Up @@ -1215,6 +1204,16 @@ jobs:
timeout-minutes: 5
run: pnpm ${{ matrix.assert-command || 'test:assert' }}

- name: Deploy Astro to Cloudflare
uses: cloudflare/pages-action@v1
if: matrix.test-application == 'cloudflare-astro'
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
projectName: ${{ secrets.CLOUDFLARE_PROJECT_NAME }}
directory: dist
workingDirectory: dev-packages/e2e-tests/test-applications/${{ matrix.test-application }}

job_profiling_e2e_tests:
name: E2E ${{ matrix.label || matrix.test-application }} Test
# We only run E2E tests for non-fork PRs because the E2E tests require secrets to work and they can't be accessed from forks
Expand Down
Loading