Commit Graph

24 Commits

Author SHA1 Message Date
Seghir Nadir 66876c4216 allow wp 5.4 + GB to fail (https://github.com/woocommerce/woocommerce-blocks/pull/2990) 2020-08-11 16:13:03 +01:00
Darren Ethier 59ca5ad19c Release: 3.0.0 (https://github.com/woocommerce/woocommerce-blocks/pull/2887)
* add changelog to readme.txt

* Add testing docs for release

* add some new commands to help with release testing phase

* Add testing notes for 3.0.0

* fix testing note typo

* updae notest to reference the new package-plugin:deploy script for use as part of the release process

* Add note about creating manual tag for the release.

* automate creation of dev tag for release.

* remove release branch from travis branches because we now do pull requests for releases

* remove duplicate back order badge for cart (https://github.com/woocommerce/woocommerce-blocks/pull/2890)

* update zip link in testing notes

* only update stable version in readme.txt if not a pre-release

* Add handling for conditional github release creation based on WP deploy question

* add distignore fir wp deploy builds

* Cart & Checkout: fix '0' visible when product stock was 0 and it allowed backorders (https://github.com/woocommerce/woocommerce-blocks/pull/2891)

* Create wordpress-deploy.yml

* fix cod not accounting for global rate values (https://github.com/woocommerce/woocommerce-blocks/pull/2894)

* ensure we’re only running checks for `wc_reserved_stock` table when necessary (https://github.com/woocommerce/woocommerce-blocks/pull/2895)

* update readme.txt changelog

* remove unnecesary variable definitions

* update github deploy script

* Bumping version strings to new version.

* add missing step for checking out code from tag

* fix exclusion for docker-compose.yml

* fix zip name (it differs from repository name)

Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
2020-07-22 12:36:55 -04:00
Darren Ethier 1026ff8fd4 Switch to use `wp-env` as the development/test environment (https://github.com/woocommerce/woocommerce-blocks/pull/2730)
* Switch to use wp-env

* fix travis config

* fix spacing?

* doh need to install packages before starting environment!

* more fixes for errors in travis environment

* hmm still have node-git issues

* nope must use dash

* maybe it’s a caching issue (we’re caching node_modules?)

* remove configs

* add wp-env override json to gitignore

* remove obsolete scripts

* fix config in travis

* restore default env (for phpunit)

* for e2e manually set WORDPRESS_BASE_URL

* doh fix variable for wp version

* run phpunit via docker and fix WordPress version used for tests

* find out what’s going on with this thing

* don’t escape?

* doh phpunit needs dev installed from composer!

* fix versions

* looks liek we have to make sure wp db is up to date?!?

- also moves pre-configuration stuff all into one file for easier maintenance.

* see if I can get insight into what the siteurl is in the wp environment on travis

* try env setup (known that will break phpunit but possible it might fix e2e?)

* output plugin list to see what is active in travis

* try flushing rules

* do a hard fulsh

* fix argument syntax

* move things around and add pre-configuration as files so all wp commands run at once

* revert back to running each container command separately

Not sure, but this might affect permissions issues?

* maybe re-ordering before the file sync will help?

also try some configuration changes

* another attempt at travis config

In this attempt:
- map .htaccess to the server on the environment start
- try changing permissions of wp-content and wp-content/plugins as a part of the e2e test bootup

* use default wp version for gute build

* refactor to run all wp commands in one go

* don’t return promise from setup function

- this might fix the sporadic fails related to the fixtures being setup (and potential race conditions there).

* make sure we activate gutenberg plugin (previously we were just installing)

The syntax of the command was incorrect.

* try alternative syntax for installing and activating plugin
2020-06-17 16:28:11 -04:00
Seghir Nadir de10d09afd Expand travis matrix (https://github.com/woocommerce/woocommerce-blocks/pull/2686)
* Expand travis matrix to cover diffrent WP versions

* skip tests on older wp versions

* duplicate tests

* add wp version to phpunit tests

* skip all products in 5.2

* fix tests

* tweak command to account for e2e-util version

* tag snapshots

* Revert "tag snapshots"

This reverts commit b55ba2e522c5a248590039a3bb224f81da2653c5.

* use hook instead of HOC

* add todo to code

* fix borked conflict

* remove dubplicate single product test

* revert assets/js/blocks/product-search/edit.js to master
2020-06-16 13:18:34 +01:00
Mike Jolley 582ba8797f Update references to use main 2020-06-16 10:38:19 +01:00
Seghir Nadir 0ac76337d4 Expand Feature flags (https://github.com/woocommerce/woocommerce-blocks/pull/2591)
* Revert "Move blocks to stable flag (https://github.com/woocommerce/woocommerce-blocks/pull/2261)"

This reverts commit a005649ab8.

* migrate to number based gating

* add todo to watch feature flag

* remove flags from build

* change flag in travis

* load flag in right order

* expose flag to js

* simplify flag definition

* more feature flags

* wrap flag in check

* add helper functions

* add helpers in PHP

* fix typo in flag

* move php code to src/domain/package

* tweak if condition

* return flag to travis

* fix broken block name
2020-06-05 20:13:51 +01:00
Rua Haszard f8489dc870 rename docker-related npm scripts so it's clear they are e2e infrastructure (https://github.com/woocommerce/woocommerce-blocks/pull/2237)
* rename docker-related npm scripts so it's clear they are e2e infrastructure

* fix travis e2e test job - update script name 😅
2020-04-17 10:44:29 +01:00
Darren Ethier 114cb63f51 try another configuration 2020-03-22 12:31:57 -04:00
Darren Ethier 71faf76a89 fix travis config for deploy step
Since the defined language is php, travis will attempt to run phpunit by default as the script. So we need an empty script config for the deploy stage.
2020-03-22 12:02:05 -04:00
Darren Ethier 7525028fbf build storybook to github pages on pushes to master (https://github.com/woocommerce/woocommerce-blocks/pull/2006) 2020-03-22 11:40:42 -04:00
Darren Ethier 41b774a3e7 Add bundle size github workflow (https://github.com/woocommerce/woocommerce-blocks/pull/2005)
* Add bundle size github workflow

This workflow implements a bundle-size monitoring utility for our repository to give better metrics on increases in bundle-sizes. I basically copied the configuration for the WordPress gutenberg project workflow and it utilizes the [`preactjs/compressed-size-action`](https://github.com/preactjs/compressed-size-action).

If this works well, it will replace our existing bundlesize implementation.

* remove bundlewatch and related scripts

* more lint job fixes

- remove build:ci because it was only used for bundlesize check. No need to build files for linting checks.
- add lint:ci npm script for doing build lint checks
- update travis job config to use new script and update title

* change name of workflow
2020-03-21 12:10:53 -04:00
Darren Ethier a602a69d4d Fix failing travis e2e tests (environment caused) (https://github.com/woocommerce/woocommerce-blocks/pull/1856)
* refresh package-lock.json

* huh, not installing from package-lock after all.. give this a try
2020-03-03 11:08:53 -05:00
Darren Ethier 090dfc98e4 ensure travis is using php 7.3 for the linting job (https://github.com/woocommerce/woocommerce-blocks/pull/1740) 2020-02-14 15:16:58 -05:00
Mike Jolley 60d05aed19 Product search block e2e test (https://github.com/woocommerce/woocommerce-blocks/pull/1712)
* add docker files

* get tests to work

* remove irrelevant files

* add woocommerce as a dep

* remove eslintignore for tests

* undo travis chages till another PR

* remove local utils and call them directly from woocommerce

* remove travis db

* Block snapshot

* Test than the block can be inserted and interacted with

* Add snapshop

* Update snapshot

* rebase on master

* add a build script for just doing npm build on e2e tests

* just run build for e2e test job

Co-authored-by: Seghir Nadir <nadir.seghir@gmail.com>
Co-authored-by: Darren Ethier <darren@roughsmootheng.in>
2020-02-11 12:23:23 -05:00
Darren Ethier a7cd7d6b22 Fix wp-cli container permissions issues for e2e docker test environment (https://github.com/woocommerce/woocommerce-blocks/pull/1716)
* add docker files

* get tests to work

* remove irrelevant files

* change userAgent to chrome

* add woocommerce as a dep

* add jest to eslint

* remove eslintignore for tests

* undo travis chages till another PR

* remove local utils and call them directly from woocommerce

* update deps

* add setup files to run tests

* export default wp link

* wait for select before selecting

* remove travis db

* ignore e2e tests in unit testing

* add tests

* add docker commands

* always run composer

* Make it possible to import directly from '@woocommerce/e2e-tests/utils'

* remove installing woocommerce via composer.

* add more docker npm scripts

* add custom docker config for wp-cli

* add changes to docker-composer.yml

Includes reading environment variables from `.env`

* revert customizations to .travis.yml

* move main docker file for the wordpress container to bin

* fix travis config

* rename wp install for travis builds back to original name

* use a version of docker-compose that travis supports

* add minor change to try and force travis test run

* fix incorrect command

* copy composer lock from master

* only run phpcs on /src directory

* give time for host to spin up for e2e tests

* increase sleep for waiting on container

* make sure plugin is built before running tests

* sigh fix improper command usage

Co-authored-by: Seghir Nadir <nadir.seghir@gmail.com>
Co-authored-by: Albert Juhé Lluveras <aljullu@gmail.com>
2020-02-11 11:13:20 -05:00
Seghir Nadir 8e3ac17585 Introduce feature flags (https://github.com/woocommerce/woocommerce-blocks/pull/1631)
* introduce feature flags

* move config to webpack-helper

* add flag to deploy command

* remove package default

* add cross-env

* add gating to frontendConfig and coreConfig

* exclude entries from being built on stable mode

* add feature gating to PHP

* add flag to start command

* add flags to travis

* add endpoints

* add better defaults for php

* move code to Bootstrap.php

* no need to spread single object

* ignore blocks.ini

* type check feature flag

* remove blocks.ini

* sanitize flag

* remove flag from npm start

* format condition

* keep spaces for package-lock.json

* check for env before going to block ini

* add env vars to travis

* whitelist env var
2020-01-31 21:04:37 +01:00
Albert Juhé Lluveras 604bfb76cb Update Node.js to v12.13.0 (https://github.com/woocommerce/woocommerce-blocks/pull/1459)
* Update Node.js to v12.13.0

* Remove npm rebuild

Co-authored-by: Seghir Nadir <nadir.seghir@gmail.com>
2020-01-02 10:51:17 +01:00
Darren Ethier 1cd70ae760 Configure travis to only run on master or release branches (does not affect pull builds) 2019-12-11 10:04:25 -05:00
Darren Ethier 2fde552e3f Refresh package-lock.json due to node lts version bump (https://github.com/woocommerce/woocommerce-blocks/pull/1058)
* refresh package-lock

* update travis config

* doh, typo

* try a rebuild for all
2019-10-21 16:26:53 +01:00
Darren Ethier e5bf616dca Add bundlesize package and tweak travis config (https://github.com/woocommerce/woocommerce-blocks/pull/822)
- adds bundlesize package and travis config to run it on pulls (reports size as a check on pulls)
- reconfigure travis configuration so that jobs are split by task for easier review/reporting
- Fix failing phpunit tests exposed as a result of the travis reconfiguration
- Fix legit fail exposed by failing phpunit test in products REST endpoint (permissions related)
- Don't abort plugin initialization when detecting no build asset file but still throw notice (necessary to ensure php tests run in travis because we don't build js/css assets unnecessarily for those tests)
2019-08-09 14:08:31 -04:00
Mike Jolley 3678beab97 Move main controllers from assets/php to src (https://github.com/woocommerce/woocommerce-blocks/pull/655)
* Create Package class and use in main plugin file

* Move and refactor library class - split asset methods into new Assets class.

* Add jetpack autoloader dependency

* fix tests

* Update from master

* Update testing framework

* Update package name

* Classname changes from master

* Indent
2019-07-01 13:52:44 +01:00
Kelly Dwan 0c85ec1bc7 Add pre-publishing script and bump version to 2.0.0-rc1 (https://github.com/woocommerce/woocommerce-blocks/pull/494)
* Add a `prepack` script to run before publish

This will re-install dependencies, run linting on PHP, CSS, and JS, run the JS tests, and lastly build the production bundle.

* phpcs is now part of `npm run lint` so we don’t need to run it twice

* Version bump to RC1
2019-03-15 12:55:34 -04:00
Kelly Dwan 9d6628e709 Add PHPCS to travis CI tests (https://github.com/woocommerce/woocommerce-blocks/pull/236)
* Limit phpcs to only linting php files

* Add composer & phpcs to travis process
2018-12-14 09:56:54 -05:00
Kelly Dwan 6a50ebde8b Adds continuous integration testing with travis (https://github.com/woocommerce/woocommerce-blocks/pull/156)
* Add travis to run JS & CSS linting, JS tests, and PHPUnit tests

* Move API initiation out of the gutenberg/files check

So that php tests run without having to build the JS files

* Add very basic product endpoint tests

* Fix stylelint issues in CSS

* Remove e2e setup, replace with dependency setup

* Add missing install step

* Remove cache for now

* Add specific `har-validator` dependency because v 5.1.2 has disappeared

* Only run npm install for the JS test job

* Check for installed plugins

* Update install location

* Fix typo in plugin name

* Check the BRANCH variable, rather than TRAVIS_PULL_REQUEST_BRANCH, which is only set on PR runs

* Remove debug command

* A change to trigger CI

* Set the expected node & npm versions

* Remove copy-pasted command, does not apply
2018-11-27 12:12:48 -05:00