Skip to content

ci(ember): Only run pinned tests for ember on build, + add canary tests #6847

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
Jan 18, 2023
Merged
Show file tree
Hide file tree
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
45 changes: 0 additions & 45 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -492,50 +492,6 @@ jobs:
cd packages/nextjs
yarn test:integration

# Ember tests are separate from the rest because they are the slowest part of the test suite, and making them a
# separate job allows them to run in parallel with the other tests.
job_ember_tests:
name: Ember (${{ matrix.scenario }}) Tests
needs: [job_get_metadata, job_build]
if: needs.job_get_metadata.outputs.changed_ember == 'true' || github.event_name != 'pull_request'
timeout-minutes: 10
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
scenario: [ember-release, embroider-optimized, ember-4.0]
steps:
- name: Check out current commit (${{ needs.job_get_metadata.outputs.commit_label }})
uses: actions/checkout@v3
with:
ref: ${{ env.HEAD_COMMIT }}
# TODO: removing `fetch-depth` below seems to have no effect, and the commit which added it had no description,
# so it's not clear why it's necessary. That said, right now ember tests are xfail, so it's a little hard to
# tell if it's safe to remove. Once ember tests are fixed, let's try again with it turned off, and if all goes
# well, we can pull it out.
fetch-depth: 0
- name: Set up Node
uses: actions/setup-node@v3
with:
# We support node 14+. If that works, we can safely assume that newer versions will also work.
node-version: '14'
- name: Check dependency cache
uses: actions/cache@v3
with:
path: ${{ env.CACHED_DEPENDENCY_PATHS }}
key: ${{ needs.job_build.outputs.dependency_cache_key }}
- name: Check build cache
uses: actions/cache@v3
with:
path: ${{ env.CACHED_BUILD_PATHS }}
key: ${{ env.BUILD_CACHE_KEY }}
- name: Run Ember tests
run: |
cd packages/ember
yarn ember try:one ${{ matrix.scenario }} --skip-cleanup=true
- name: Compute test coverage
uses: codecov/codecov-action@v3

job_browser_playwright_tests:
name: Playwright (${{ matrix.bundle }})${{ (matrix.tracing_only && ' tracing only') || '' }} Tests
needs: [job_get_metadata, job_build]
Expand Down Expand Up @@ -804,7 +760,6 @@ jobs:
job_browser_playwright_tests,
job_browser_integration_tests,
job_remix_integration_tests,
job_ember_tests,
]
# Always run this, even if a dependent job failed
if: always()
Expand Down
40 changes: 39 additions & 1 deletion .github/workflows/canary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ permissions:

jobs:
job_canary_test:
name: Run Canary Tests
name: Canary Tests
runs-on: ubuntu-20.04
timeout-minutes: 30
steps:
Expand Down Expand Up @@ -55,3 +55,41 @@ jobs:
RUN_LINK: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
with:
filename: .github/CANARY_FAILURE_TEMPLATE.md

job_ember_canary_test:
name: Ember Canary Tests
runs-on: ubuntu-20.04
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
scenario: [ember-release, embroider-optimized, ember-4.0]
steps:
- name: 'Check out current commit'
uses: actions/checkout@v3
with:
ref: ${{ env.HEAD_COMMIT }}
- name: Set up Node
uses: volta-cli/action@v4

- name: Install dependencies
run: yarn install --ignore-engines --frozen-lockfile

- name: Build dependencies
run: |
yarn lerna run build:types --scope=@sentry/ember --include-dependencies
yarn lerna run build:transpile --scope=@sentry/ember --include-dependencies

- name: Run Ember tests
run: |
cd packages/ember
yarn ember try:one ${{ matrix.scenario }} --skip-cleanup=true

- name: Create Issue
if: failure()
uses: JasonEtco/create-an-issue@e27dddc79c92bc6e4562f268fffa5ed752639abd
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
RUN_LINK: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
with:
filename: .github/CANARY_FAILURE_TEMPLATE.md
3 changes: 1 addition & 2 deletions packages/ember/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,8 @@
"test": "tests"
},
"scripts": {
"build:uncached": "ember build --environment=production",
"build:tarball": "ember ts:precompile && npm pack && ember ts:clean",
"clean": "yarn rimraf sentry-ember-*.tgz",
"clean": "yarn rimraf sentry-ember-*.tgz dist tmp build .node_modules.ember-try package.json.ember-try",
"lint": "run-p lint:js lint:hbs lint:ts",
"lint:hbs": "ember-template-lint .",
"lint:js": "eslint . --cache --cache-location '../../eslintcache/'",
Expand Down