Skip to content
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

Run performance tests #1210

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
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
52 changes: 30 additions & 22 deletions .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,12 @@ steps:
commands:
- npm config set "//registry.npmjs.org/:_authToken" $${NPM_TOKEN}
- echo "--- Install dependencies"
- yarn install --immutable
- yarn run -T browser exec make ci
- PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1 yarn install --immutable
- echo "--- Build bundles"
- yarn run -T browser . build
- echo "+++ Run tests"
- yarn run -T browser lint
- yarn run -T browser test
plugins:
- ssh://[email protected]/segmentio/cache-buildkite-plugin#v2.0.0:
key: "v1.1-cache-dev-{{ checksum 'yarn.lock' }}"
Expand Down Expand Up @@ -78,8 +82,12 @@ steps:
- echo "--- Install dependencies"
- PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1 yarn install --immutable
- PLAYWRIGHT_BROWSERS_PATH=$HOME/pw-browsers npx playwright install
- echo '+++ Check Size limit'
- yarn run -T browser size-limit
- echo "+++ Run Browser integration tests :pray:"
- PLAYWRIGHT_BROWSERS_PATH=$HOME/pw-browsers yarn turbo run --filter=browser-integration-tests test
- yarn run -T browser exec make test-integration
- yarn run -T browser exec make test-perf
retry:
automatic:
- exit_status: '*'
Expand All @@ -88,7 +96,26 @@ steps:
- ssh://[email protected]/segmentio/cache-buildkite-plugin#v2.0.0:
key: "v1.1-cache-dev-{{ checksum 'yarn.lock' }}"
paths: ['.yarn/cache/']


- label: ':thisisfine: [Browser] Destinations QA / E2E'
key: destinations
agents:
queue: v1
env:
COVERAGE: false
commands:
- npm config set "//registry.npmjs.org/:_authToken" $${NPM_TOKEN}
- echo "--- Install dependencies"
- yarn install --immutable
- echo "+++ Run Integration Tests :pray:"
- yarn run -T browser exec make test-qa-destinations
soft_fail:
- exit_status: '*'
plugins:
- ssh://[email protected]/segmentio/cache-buildkite-plugin#v2.0.0:
key: "v1.1-cache-dev-{{ checksum 'yarn.lock' }}"
paths: ['.yarn/cache/']

- label: '[Core] Lint + Test'
env:
SEGMENT_CODECOV_FLAGS: 'core'
Expand Down Expand Up @@ -162,25 +189,6 @@ steps:
key: "v1.1-cache-dev-{{ checksum 'yarn.lock' }}"
paths: ['.yarn/cache/']

- label: ':thisisfine: [Browser] Destinations QA / E2E'
key: destinations
agents:
queue: v1
env:
COVERAGE: false
commands:
- npm config set "//registry.npmjs.org/:_authToken" $${NPM_TOKEN}
- echo "--- Install dependencies"
- yarn install --immutable
- echo "+++ Run Destinations QA Tests :pray:"
- yarn run -T browser exec make test-qa-destinations
soft_fail:
- exit_status: '*'
plugins:
- ssh://[email protected]/segmentio/cache-buildkite-plugin#v2.0.0:
key: "v1.1-cache-dev-{{ checksum 'yarn.lock' }}"
paths: ['.yarn/cache/']

- label: '[Browser] Release to CDN :rocket:'
branches: '!v* !@segment/* !publish-test'
agents:
Expand Down
28 changes: 5 additions & 23 deletions packages/browser/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,10 @@ help: ## Lists all available make tasks and some short documentation about them
@grep -E '^[a-zA-Z0-9_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-24s\033[0m %s\n", $$1, $$2}'
.PHONY: help


## Basic repo maintenance

# Installs npm dependencies
node_modules:
yarn install --immutable
@touch $@

build-browser: build # build dependencies
$(yarn_run) umd --no-stats
.PHONY: build-browser

build: ## Builds libraries in prod mode, and all dependencies
yarn run -T browser . build
.PHONY: build
Expand All @@ -25,40 +17,30 @@ clean: ## Clean the build directory
rm -rf dist generated
.PHONY: clean

## Test Commands

tdd: node_modules ## Runs unit tests in watch mode
$(yarn_run) test --watch
.PHONY: tdd

test-unit: node_modules ## Runs unit tests
$(yarn_run) test
.PHONY: test-unit

test-qa: build-browser ## Runs all QA tests in a single command
test-qa: build
COVERAGE=false $(yarn_run) test --runTestsByPath qa/__tests__/*.test.ts --testPathIgnorePatterns qa/__tests__/destinations.test.ts --reporters="default" --reporters="<rootDir>/qa/lib/jest-reporter.js" ${args}
.PHONY: test-qa

test-qa-destinations: build-browser ## Runs Destination QA tests. options. DESTINATION=amplitude DEBUG=true
test-qa-destinations: build
COVERAGE=false $(yarn_run) test --forceExit --runTestsByPath qa/__tests__/destinations.test.ts --reporters="default" --reporters="<rootDir>/qa/lib/jest-reporter.js" ${args}
.PHONY: test-qa-destinations
.PHONY: test-

test-integration: build ## Runs all integration tests in a single command
test-integration: build
COVERAGE=false $(yarn_run) test --forceExit --runTestsByPath e2e-tests/**/*.test.ts ${args}
.PHONY: test-integration

test-perf: build ## Runs all integration tests in a single command
test-perf: build
$(yarn_run) test --forceExit --runTestsByPath e2e-tests/performance/*.test.ts ${args}
.PHONY: test-perf

lint: node_modules ## Lints the source code
$(yarn_run) lint
.PHONY: lint

ci:
bash ./scripts/ci.sh
.PHONY: ci

handshake:
@echo "📡 Establishing Remote connection"
@robo --config ~/dev/src/github.com/segmentio/robofiles/development/robo.yml prod.ssh echo "✅ Connected"
Expand Down
15 changes: 0 additions & 15 deletions packages/browser/scripts/ci.sh

This file was deleted.

Loading