Skip to content

Commit

Permalink
Synced with the latest as of 30-Oct-2023
Browse files Browse the repository at this point in the history
  • Loading branch information
atachibana committed Nov 2, 2023
2 parents 1852961 + 211f754 commit f43e71b
Show file tree
Hide file tree
Showing 704 changed files with 41,726 additions and 36,366 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/publish-npm-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ jobs:
with:
path: publish
ref: wp/${{ github.event.inputs.wp_version }}
# We need to ensure that Lerna can read the commit created during the previous npm publishing.
# Lerna assumes that all packages need publishing if it can't access the necessary information.
fetch-depth: 999
token: ${{ secrets.GUTENBERG_TOKEN }}
show-progress: ${{ runner.debug == '1' && 'true' || 'false' }}

Expand Down
10 changes: 10 additions & 0 deletions .github/workflows/rnmobile-android-runner.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,16 @@ jobs:
- name: Setup Node.js and install dependencies
uses: ./.github/setup-node

- name: Restore tests setup cache
uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2
with:
path: |
~/.appium
key: ${{ runner.os }}-tests-setup-${{ hashFiles('package-lock.json') }}

- name: Prepare tests setup
run: npm run native test:e2e:setup

- name: Gradle cache
uses: gradle/gradle-build-action@b5126f31dbc19dd434c3269bf8c28c315e121da2 # v2.8.1

Expand Down
26 changes: 18 additions & 8 deletions .github/workflows/rnmobile-ios-runner.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ jobs:
if: ${{ github.repository == 'WordPress/gutenberg' || github.event_name == 'pull_request' }}
strategy:
matrix:
xcode: ['13.3.1']
device: ['iPhone 13']
xcode: ['14.2']
device: ['iPhone 14']
native-test-name: [gutenberg-editor-rendering]

steps:
Expand Down Expand Up @@ -113,9 +113,25 @@ jobs:
show-progress: ${{ runner.debug == '1' && 'true' || 'false' }}
>>>>>>> upstream/trunk

- name: Switch Xcode version to ${{ matrix.xcode }}
run: sudo xcode-select --switch /Applications/Xcode_${{ matrix.xcode }}.app

- name: Launch simulator
run: (open -a Simulator && xcrun simctl boot '${{ matrix.device }}') &

- name: Setup Node.js and install dependencies
uses: ./.github/setup-node

- name: Restore tests setup cache
uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2
with:
path: |
~/.appium
key: ${{ runner.os }}-tests-setup-${{ hashFiles('package-lock.json') }}

- name: Prepare tests setup
run: npm run native test:e2e:setup

- name: Prepare build cache key
run: find package-lock.json packages/react-native-editor/ios packages/react-native-aztec/ios packages/react-native-bridge/ios -type f -print0 | sort -z | xargs -0 shasum | tee ios-checksums.txt

Expand All @@ -140,18 +156,12 @@ jobs:
- name: Bundle iOS
run: npm run native test:e2e:bundle:ios

- name: Switch Xcode version to ${{ matrix.xcode }}
run: sudo xcode-select --switch /Applications/Xcode_${{ matrix.xcode }}.app

- name: Build (if needed)
run: test -e packages/react-native-editor/ios/build/GutenbergDemo/Build/Products/Release-iphonesimulator/GutenbergDemo.app/GutenbergDemo || npm run native test:e2e:build-app:ios

- name: Build Web Driver Agent (if needed)
run: test -d packages/react-native-editor/ios/build/WDA || npm run native test:e2e:build-wda

- name: Launch simulator
run: open -a Simulator && xcrun simctl boot '${{ matrix.device }}'

- name: Run iOS Device Tests
run: TEST_RN_PLATFORM=ios npm run native device-tests:local ${{ matrix.native-test-name }}

Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/upload-release-to-plugin-repo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,8 @@ jobs:
svn st | grep '^?' | awk '{print $2}' | xargs -r svn add
svn st | grep '^!' | awk '{print $2}' | xargs -r svn rm
svn commit -m "Committing version $VERSION" \
--no-auth-cache --non-interactive --username "$SVN_USERNAME" --password "$SVN_PASSWORD"
--no-auth-cache --non-interactive --username "$SVN_USERNAME" --password "$SVN_PASSWORD" \
--config-option=servers:global:http-timeout=300
- name: Create the SVN tag
working-directory: ./trunk
Expand Down Expand Up @@ -254,4 +255,5 @@ jobs:
- name: Add the new version directory and commit changes to the SVN repository
run: |
svn import "$VERSION" "$PLUGIN_REPO_URL/tags/$VERSION" -m "Committing version $VERSION" \
--no-auth-cache --non-interactive --username "$SVN_USERNAME" --password "$SVN_PASSWORD"
--no-auth-cache --non-interactive --username "$SVN_USERNAME" --password "$SVN_PASSWORD" \
--config-option=servers:global:http-timeout=300
22 changes: 6 additions & 16 deletions bin/plugin/commands/packages.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,24 +83,14 @@ async function checkoutNpmReleaseBranch( {
/*
* Create the release branch.
*
* Note that we are grabbing an arbitrary depth of commits
* during the fetch. When `lerna` attempts to determine if
* a package needs an update, it looks at `git` history,
* and if we have pruned that history it will pre-emptively
* publish when it doesn't need to.
*
* We could set a different arbitrary depth if this isn't
* long enough or if it's excessive. We could also try and
* find a way to more specifically fetch what we expect to
* change. For example, if we knew we'll be performing
* updates every two weeks, we might be conservative and
* use `--shallow-since=4.weeks.ago`.
*
* At the time of writing, a depth of 100 pulls in all
* `trunk` commits from within the past week.
* Note that we are grabbing an arbitrary depth of commits (999) during the fetch.
* When Lerna attempts to determine if a package needs an update, it looks at
* `git` history to find the commit created during the previous npm publishing.
* Lerna assumes that all packages need publishing if it can't access
* the necessary information.
*/
await SimpleGit( gitWorkingDirectoryPath )
.fetch( 'origin', npmReleaseBranch, [ '--depth=100' ] )
.fetch( 'origin', npmReleaseBranch, [ '--depth=999' ] )
.checkout( npmReleaseBranch );
log(
'>> The local npm release branch ' +
Expand Down
Loading

0 comments on commit f43e71b

Please sign in to comment.