Skip to content

Commit

Permalink
chore: remove ember-fetch weirdness (emberjs#8473)
Browse files Browse the repository at this point in the history
* chore: remove ember-fetch weirdness

* master => main

* nicer fastboot tests

* fix types

* test harness cleanup
  • Loading branch information
runspired authored Mar 16, 2023
1 parent 9c39666 commit c537023
Show file tree
Hide file tree
Showing 50 changed files with 253 additions and 390 deletions.
8 changes: 4 additions & 4 deletions .github/actions/prepare-build/action copy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ runs:
- if: ${{ inputs.restore-main }}
uses: ./actions/prepare-build
with:
ref: master
ref: main
name: Main
build:
id: restore-main
Expand All @@ -64,7 +64,7 @@ runs:
name: Build Main
uses: actions/checkout@v3
with:
ref: master
ref: main
fetch-depth: 1
run: |
pnpm install
Expand Down Expand Up @@ -106,7 +106,7 @@ runs:
~/.broccoli-cache
key: ${{ github.ref }}
restore-keys: |
master
main
- if: ${{ inputs.restore-lint-caches }}
name: Restore Lint Caches
Expand All @@ -116,4 +116,4 @@ runs:
.eslintcache
key: ${{ github.ref }}
restore-keys: |
master
main
2 changes: 1 addition & 1 deletion .github/actions/prepare-build/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ runs:
./${{ inputs.package }}/dist-${{ inputs.ref }}${{ inputs.ext }}
key: ${{ inputs.ref }}
restore-keys: |
master
main
- if: ${{ steps.restore-ref-artifact.outputs.cache-hit != 'true' }}
name: Build ${{ inputs.name }}
Expand Down
4 changes: 2 additions & 2 deletions .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ runs:
restore-keys: |
broccoli-${{ github.head_ref }}
broccoli-${{ github.base_ref }}
broccoli-master
broccoli-main
- name: Restore Lint Caches
if: ${{ inputs.restore-lint-caches == 'true' }}
Expand All @@ -95,4 +95,4 @@ runs:
restore-keys: |
lint-${{ github.head_ref }}
lint-${{ github.base_ref }}
lint-master
lint-main
3 changes: 0 additions & 3 deletions .github/renovate.json
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,6 @@
},
{
"matchPackageNames": [
"ember-uuid",
"ember-ajax",
"ember-fetch",
"ember-inflector",
"ember-promise-helpers"
],
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/asset-size-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: AssetSize
on:
pull_request:
branches:
- master
- main
types:
- labeled
- synchronize
Expand All @@ -21,7 +21,7 @@ jobs:
- uses: actions/checkout@v3
with:
fetch-depth: 3
- run: git fetch origin master --depth=1
- run: git fetch origin main --depth=1
- uses: pnpm/action-setup@c3b53f6a16e57305370b4ae5a540c2077a1d50dd # tag=v2.2.4
- uses: actions/setup-node@v3
with:
Expand All @@ -37,11 +37,11 @@ jobs:
originSha=$(git rev-parse HEAD^2)
echo $originSha > tmp/sha-for-commit.txt
git show --format=short --no-patch $originSha
- name: Checkout master
run: git checkout master
- name: Install dependencies for master
- name: Checkout main
run: git checkout main
- name: Install dependencies for main
run: pnpm install
- name: Build Production master
- name: Build Production main
run: pnpm --filter "full-data-asset-size-app" exec ember build -e production --output-path dists/control --suppress-sizes
- name: Checkout ${{github.ref}}
run: |
Expand All @@ -56,7 +56,7 @@ jobs:
mkdir -p tmp
mkdir -p tmp/asset-sizes
node ./scripts/asset-size-tracking/generate-analysis.js tests/full-data-asset-size-app/dists/control ./control-data.json
node ./scripts/asset-size-tracking/print-analysis.js ./control-data.json -show > tmp/asset-sizes/master-analysis.txt
node ./scripts/asset-size-tracking/print-analysis.js ./control-data.json -show > tmp/asset-sizes/main-analysis.txt
- name: Analyze ${{github.ref}} Assets
run: |
node ./scripts/asset-size-tracking/generate-analysis.js tests/full-data-asset-size-app/dists/experiment ./experiment-data.json
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/beta-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@ jobs:
with:
fetch-depth: 3
ref: beta
- run: git fetch origin master --depth=1
- run: git fetch origin main --depth=1
- name: Get last beta version from package.json
uses: sergeysova/jq-action@v2
id: version
with:
cmd: 'jq .version package.json -r'
- name: Reset the Beta Branch
run: git reset --hard origin/master && git push origin beta -f
run: git reset --hard origin/main && git push origin beta -f
- uses: ./.github/actions/setup
with:
build-addons: true
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/compat-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Compat
on:
pull_request:
branches:
- master
- main

concurrency:
group: compat-${{ github.head_ref || github.ref_name }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docs-and-blueprint-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: DX
on:
pull_request:
branches:
- master
- main

concurrency:
group: docs-${{ github.head_ref || github.ref_name }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/encapsulation-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Contract
on:
pull_request:
branches:
- master
- main

concurrency:
group: encapsulation-${{ github.head_ref || github.ref_name }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/enforce-pr-labels-beta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
- uses: yogevbd/[email protected]
with:
BANNED_LABELS: 'target:canary,target:beta,target:release,target:lts,target:lts-prev'
BANNED_LABELS_DESCRIPTION: "These labels should only be used for PRs targeting the master branch, remove them. ['target:canary', 'target:beta', 'target:release', 'target:lts', 'target:lts-prev']"
BANNED_LABELS_DESCRIPTION: "These labels should only be used for PRs targeting the main branch, remove them. ['target:canary', 'target:beta', 'target:release', 'target:lts', 'target:lts-prev']"
ban-other-release-branch-labels:
runs-on: ubuntu-latest
steps:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/enforce-pr-labels-canary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
pull_request:
types: [labeled, unlabeled, opened, reopened, edited, synchronize]
branches:
- master
- main

concurrency:
group: pr-labels-canary-${{ github.head_ref || github.ref_name }}
Expand All @@ -31,4 +31,4 @@ jobs:
- uses: yogevbd/[email protected]
with:
BANNED_LABELS: 'backport-beta,backport-release,backport-lts,backport-lts-prev,backport-old-release'
BANNED_LABELS_DESCRIPTION: "The following labels should only be applied to PRs targeting release channel branches that backport a change already on the master branch, remove them.['backport-beta', 'backport-release', 'backport-lts', 'backport-lts-prev', 'backport-old-release']"
BANNED_LABELS_DESCRIPTION: "The following labels should only be applied to PRs targeting release channel branches that backport a change already on the main branch, remove them.['backport-beta', 'backport-release', 'backport-lts', 'backport-lts-prev', 'backport-old-release']"
2 changes: 1 addition & 1 deletion .github/workflows/enforce-pr-labels-lts-prev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
- uses: yogevbd/[email protected]
with:
BANNED_LABELS: 'target:canary,target:beta,target:release,target:lts,target:lts-prev'
BANNED_LABELS_DESCRIPTION: "These labels should only be used for PRs targeting the master branch, remove them. ['target:canary', 'target:beta', 'target:release', 'target:lts', 'target:lts-prev']"
BANNED_LABELS_DESCRIPTION: "These labels should only be used for PRs targeting the main branch, remove them. ['target:canary', 'target:beta', 'target:release', 'target:lts', 'target:lts-prev']"
ban-other-release-branch-labels:
runs-on: ubuntu-latest
steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/enforce-pr-labels-lts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
- uses: yogevbd/[email protected]
with:
BANNED_LABELS: 'target:canary,target:beta,target:release,target:lts,target:lts-prev'
BANNED_LABELS_DESCRIPTION: "These labels should only be used for PRs targeting the master branch, remove them. ['target:canary', 'target:beta', 'target:release', 'target:lts', 'target:lts-prev']"
BANNED_LABELS_DESCRIPTION: "These labels should only be used for PRs targeting the main branch, remove them. ['target:canary', 'target:beta', 'target:release', 'target:lts', 'target:lts-prev']"
ban-other-release-branch-labels:
runs-on: ubuntu-latest
steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/enforce-pr-labels-old-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
- uses: yogevbd/[email protected]
with:
BANNED_LABELS: 'target:canary,target:beta,target:release,target:lts,target:lts-prev'
BANNED_LABELS_DESCRIPTION: "These labels should only be used for PRs targeting the master branch, remove them. ['target:canary', 'target:beta', 'target:release', 'target:lts', 'target:lts-prev']"
BANNED_LABELS_DESCRIPTION: "These labels should only be used for PRs targeting the main branch, remove them. ['target:canary', 'target:beta', 'target:release', 'target:lts', 'target:lts-prev']"
ban-other-release-branch-labels:
runs-on: ubuntu-latest
steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/enforce-pr-labels-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
- uses: yogevbd/[email protected]
with:
BANNED_LABELS: 'target:canary,target:beta,target:release,target:lts,target:lts-prev'
BANNED_LABELS_DESCRIPTION: "These labels should only be used for PRs targeting the master branch, remove them. ['target:canary', 'target:beta', 'target:release', 'target:lts', 'target:lts-prev']"
BANNED_LABELS_DESCRIPTION: "These labels should only be used for PRs targeting the main branch, remove them. ['target:canary', 'target:beta', 'target:release', 'target:lts', 'target:lts-prev']"
ban-other-release-branch-labels:
runs-on: ubuntu-latest
steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/infra-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Infra
on:
pull_request:
branches:
- master
- main
types:
- labeled
- synchronize
Expand Down
38 changes: 8 additions & 30 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
pull_request:
push:
branches:
- master
- main
- beta
- release
- 'release-*'
Expand Down Expand Up @@ -43,15 +43,15 @@ jobs:
install: true
- if: |
github.event_name == 'pull_request' && (
github.base_ref == 'master' || github.base_ref == 'beta'
github.base_ref == 'main' || github.base_ref == 'beta'
)
name: Enable All In progress features
env:
EMBER_DATA_FEATURE_OVERRIDE: ENABLE_ALL_OPTIONAL
run: pnpm test
- if: |
github.event_name == 'pull_request' && (
github.base_ref == 'master' || github.base_ref == 'beta'
github.base_ref == 'main' || github.base_ref == 'beta'
)
name: Disabled All In progress features
env:
Expand All @@ -61,7 +61,7 @@ jobs:
run: pnpm test:production
- if: |
github.event_name == 'pull_request' && (
github.base_ref == 'master' || github.base_ref == 'beta'
github.base_ref == 'main' || github.base_ref == 'beta'
)
name: Remove All Deprecations
env:
Expand Down Expand Up @@ -99,7 +99,7 @@ jobs:
strategy:
fail-fast: false
matrix:
scenario: [ember-lts-4.4, ember-lts-3.28]
scenario: [ember-lts-4.8, ember-lts-4.4, ember-lts-3.28]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand All @@ -118,17 +118,14 @@ jobs:
needs: [browser-tests]
if: |
github.event_name == 'pull_request' && (
github.base_ref == 'master' || github.base_ref == 'beta'
github.base_ref == 'main' || github.base_ref == 'beta'
) || github.event_name == 'push' && (
endsWith(github.ref, '/master') || endsWith(github.ref, '/beta')
endsWith(github.ref, '/main') || endsWith(github.ref, '/beta')
)
strategy:
fail-fast: false
matrix:
release: [ember-release, ember-beta]
include:
- release: ember-beta
continue-on-error: false
release: [ember-canary, ember-beta]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand All @@ -140,22 +137,3 @@ jobs:
env:
CI: true
run: pnpm test:try-one ${{ matrix.release }} -- ember test --test-port=0
continue-on-error: ${{ matrix['continue-on-error'] == true }}

additional-scenarios:
timeout-minutes: 8
needs: [browser-tests]
strategy:
matrix:
scenario: [with-native-fetch, with-ember-fetch-no-jquery, with-ember-fetch-and-jquery, with-jquery]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/setup
with:
restore-broccoli-cache: true
install: true
- name: Basic tests with ${{ matrix.scenario }}
env:
CI: true
run: pnpm test:try-one ${{ matrix.scenario }} -- ember test --test-port=0
2 changes: 1 addition & 1 deletion .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
with:
node-version: 19.x
cache: 'pnpm'
- name: Install dependencies for master
- name: Install dependencies for main
run: pnpm install
- name: Basic Tests
env:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/partner-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Partner Tests
on:
pull_request:
branches:
- master
- main
types:
- labeled
- synchronize
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/perf-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Performance Checks
on:
pull_request:
branches:
- master
- main
types:
- labeled
- synchronize
Expand All @@ -22,7 +22,7 @@ jobs:
- uses: actions/checkout@v3
with:
fetch-depth: 3
- run: git fetch origin master --depth=1
- run: git fetch origin main --depth=1
- name: Check SHA
run: |
sha=$(git rev-parse --short=8 HEAD)
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/perf-over-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Performance Check Against Release
on:
pull_request:
branches:
- master
- main
types:
- labeled
- synchronize
Expand Down
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ Before implementing a feature or a fix, it is usually best to discuss the propos
existing public APIs. If this is the case, it is even more important to discuss the issue's problem
space and the proposed changes before diving too deep into the implementation.

- Submissions should be made as PRs against the `master` branch.
- Submissions should be made as PRs against the `main` branch.

#### Writing Tests

Expand Down Expand Up @@ -150,7 +150,7 @@ applied by project maintainers. PRs from non-maintainers will be labeled by main
**Changelog Labels**

Labels used for the changelog include `skip-changelog` which should be used if the PR should not be considered for the changelog,
and any labels listed in the [root package.json's changelog config](https://github.com/emberjs/data/blob/master/package.json#L154).
and any labels listed in the [root package.json's changelog config](https://github.com/emberjs/data/blob/main/package.json#L154).
These labels are prefixed with `changelog:` and currently the options are:

- `changelog:breaking` which should be used to signify a breaking change
Expand Down
Loading

0 comments on commit c537023

Please sign in to comment.