Skip to content
Closed
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
5 changes: 5 additions & 0 deletions .buildkite/commands/install_node_dependencies.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash -eu

# --legacy-peer-deps is necessary because of react-monaco-editor.
# See README for more details
install_npm_packages_clean --legacy-peer-deps
Copy link
Contributor Author

Choose a reason for hiding this comment

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

48 changes: 48 additions & 0 deletions .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
env:
BUILDKITE_PLUGINS_ALWAYS_CLONE_FRESH: 1

steps:
- label: Build cache
key: build_cache
agents:
queue: mac
env:
IMAGE_ID: $IMAGE_ID
plugins:
- $CI_TOOLKIT_PLUGIN
- $NVM_PLUGIN
command: |
echo "--- :npm: Pre-build npm cache if needed"
.buildkite/commands/install_node_dependencies.sh

- label: Lint
key: lint
depends_on: build_cache
agents:
queue: mac
env:
IMAGE_ID: $IMAGE_ID
NODE_ENV: test
plugins:
- $CI_TOOLKIT_PLUGIN
- $NVM_PLUGIN
command: |
.buildkite/commands/install_node_dependencies.sh
echo "--- :eslint: Lint"
make lint

- label: Test
key: test
depends_on: build_cache
agents:
queue: mac
env:
IMAGE_ID: $IMAGE_ID
NODE_ENV: test
plugins:
- $CI_TOOLKIT_PLUGIN
- $NVM_PLUGIN
command: |
.buildkite/commands/install_node_dependencies.sh
echo "--- :jest: Test"
npm test
13 changes: 13 additions & 0 deletions .buildkite/shared-pipeline-vars
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/sh

# This file is `source`'d before calling `buildkite-agent pipeline upload`, and can be used
# to set up some variables that will be interpolated in the `.yml` pipeline before uploading it.

# The ~> modifier is not currently used, but we check for it just in case
XCODE_VERSION=$(sed -E -n 's/^(~> )?(.*)/xcode-\2/p' .xcode-version)
CI_TOOLKIT_PLUGIN_VERSION='mokagio/npm_ci'
NVM_PLUGIN_VERSION='0.3.0'

export IMAGE_ID="$XCODE_VERSION"
export CI_TOOLKIT_PLUGIN="automattic/a8c-ci-toolkit#$CI_TOOLKIT_PLUGIN_VERSION"
export NVM_PLUGIN="automattic/nvm#$NVM_PLUGIN_VERSION"
19 changes: 0 additions & 19 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,23 +98,6 @@ jobs:
- persist_to_workspace:
root: ~/simplenote
paths: *app_cache_paths
test:
docker:
- image: cimg/node:18.19.1
shell: /bin/bash --login
working_directory: ~/simplenote
steps:
- *install_linux_deps
- checkout
- *decrypt
- *restore_nvm
- *setup_nvm
- *save_nvm
- *npm_restore_cache
- *npm_install
- run: NODE_ENV=test npm run build
- run: npm test
- run: npm run lint

linux:
docker:
Expand Down Expand Up @@ -268,8 +251,6 @@ workflows:
jobs:
- build:
filters: *job_filters
- test:
filters: *job_filters
- linux:
requires:
- build
Expand Down
1 change: 1 addition & 0 deletions .xcode-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
15.4