Skip to content

Commit c06756c

Browse files
authored
ci(ember): Only run pinned tests for ember on build, + add canary tests (#6847)
They are run in the browser unit tests
1 parent 6c36614 commit c06756c

File tree

3 files changed

+40
-48
lines changed

3 files changed

+40
-48
lines changed

.github/workflows/build.yml

Lines changed: 0 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -516,50 +516,6 @@ jobs:
516516
cd packages/nextjs
517517
yarn test:integration
518518
519-
# Ember tests are separate from the rest because they are the slowest part of the test suite, and making them a
520-
# separate job allows them to run in parallel with the other tests.
521-
job_ember_tests:
522-
name: Ember (${{ matrix.scenario }}) Tests
523-
needs: [job_get_metadata, job_build]
524-
if: needs.job_get_metadata.outputs.changed_ember == 'true' || github.event_name != 'pull_request'
525-
timeout-minutes: 10
526-
runs-on: ubuntu-20.04
527-
strategy:
528-
fail-fast: false
529-
matrix:
530-
scenario: [ember-release, embroider-optimized, ember-4.0]
531-
steps:
532-
- name: Check out current commit (${{ needs.job_get_metadata.outputs.commit_label }})
533-
uses: actions/checkout@v3
534-
with:
535-
ref: ${{ env.HEAD_COMMIT }}
536-
# TODO: removing `fetch-depth` below seems to have no effect, and the commit which added it had no description,
537-
# so it's not clear why it's necessary. That said, right now ember tests are xfail, so it's a little hard to
538-
# tell if it's safe to remove. Once ember tests are fixed, let's try again with it turned off, and if all goes
539-
# well, we can pull it out.
540-
fetch-depth: 0
541-
- name: Set up Node
542-
uses: actions/setup-node@v3
543-
with:
544-
# We support node 14+. If that works, we can safely assume that newer versions will also work.
545-
node-version: '14'
546-
- name: Check dependency cache
547-
uses: actions/cache@v3
548-
with:
549-
path: ${{ env.CACHED_DEPENDENCY_PATHS }}
550-
key: ${{ needs.job_build.outputs.dependency_cache_key }}
551-
- name: Check build cache
552-
uses: actions/cache@v3
553-
with:
554-
path: ${{ env.CACHED_BUILD_PATHS }}
555-
key: ${{ env.BUILD_CACHE_KEY }}
556-
- name: Run Ember tests
557-
run: |
558-
cd packages/ember
559-
yarn ember try:one ${{ matrix.scenario }} --skip-cleanup=true
560-
- name: Compute test coverage
561-
uses: codecov/codecov-action@v3
562-
563519
job_browser_playwright_tests:
564520
name: Playwright (${{ matrix.bundle }})${{ (matrix.tracing_only && ' tracing only') || '' }} Tests
565521
needs: [job_get_metadata, job_build]
@@ -828,7 +784,6 @@ jobs:
828784
job_browser_playwright_tests,
829785
job_browser_integration_tests,
830786
job_remix_integration_tests,
831-
job_ember_tests,
832787
]
833788
# Always run this, even if a dependent job failed
834789
if: always()

.github/workflows/canary.yml

Lines changed: 39 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ permissions:
1818

1919
jobs:
2020
job_canary_test:
21-
name: Run Canary Tests
21+
name: Canary Tests
2222
runs-on: ubuntu-20.04
2323
timeout-minutes: 30
2424
steps:
@@ -55,3 +55,41 @@ jobs:
5555
RUN_LINK: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
5656
with:
5757
filename: .github/CANARY_FAILURE_TEMPLATE.md
58+
59+
job_ember_canary_test:
60+
name: Ember Canary Tests
61+
runs-on: ubuntu-20.04
62+
timeout-minutes: 30
63+
strategy:
64+
fail-fast: false
65+
matrix:
66+
scenario: [ember-release, embroider-optimized, ember-4.0]
67+
steps:
68+
- name: 'Check out current commit'
69+
uses: actions/checkout@v3
70+
with:
71+
ref: ${{ env.HEAD_COMMIT }}
72+
- name: Set up Node
73+
uses: volta-cli/action@v4
74+
75+
- name: Install dependencies
76+
run: yarn install --ignore-engines --frozen-lockfile
77+
78+
- name: Build dependencies
79+
run: |
80+
yarn lerna run build:types --scope=@sentry/ember --include-dependencies
81+
yarn lerna run build:transpile --scope=@sentry/ember --include-dependencies
82+
83+
- name: Run Ember tests
84+
run: |
85+
cd packages/ember
86+
yarn ember try:one ${{ matrix.scenario }} --skip-cleanup=true
87+
88+
- name: Create Issue
89+
if: failure()
90+
uses: JasonEtco/create-an-issue@e27dddc79c92bc6e4562f268fffa5ed752639abd
91+
env:
92+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
93+
RUN_LINK: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
94+
with:
95+
filename: .github/CANARY_FAILURE_TEMPLATE.md

packages/ember/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,8 @@
1717
"test": "tests"
1818
},
1919
"scripts": {
20-
"build:uncached": "ember build --environment=production",
2120
"build:tarball": "ember ts:precompile && npm pack && ember ts:clean",
22-
"clean": "yarn rimraf sentry-ember-*.tgz",
21+
"clean": "yarn rimraf sentry-ember-*.tgz dist tmp build .node_modules.ember-try package.json.ember-try",
2322
"lint": "run-p lint:js lint:hbs lint:ts",
2423
"lint:hbs": "ember-template-lint .",
2524
"lint:js": "eslint . --cache --cache-location '../../eslintcache/'",

0 commit comments

Comments
 (0)