Skip to content

Commit

Permalink
[CMS 933] Add Cache Hit ratios to metrics (#2399)
Browse files Browse the repository at this point in the history
* [FEAT-898] Integrate site cache hit rate metrics (#2389)

Co-authored-by: Jordan Schulz <[email protected]>
  • Loading branch information
stovak and jms-pantheon authored Oct 18, 2022
1 parent 2844ad3 commit 9f01a61
Show file tree
Hide file tree
Showing 16 changed files with 284 additions and 116 deletions.
6 changes: 6 additions & 0 deletions .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[bumpversion]
current_version = 3.1.0
commit = true
tag = true

[bumpversion:file:config/constants.yml]
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,4 @@ reports/*
/Formula
*.deb
Brewfile.lock.json
/.phive
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
# Change Log
All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org)

## 3.0.10-dev
## 3.1.0 - 2022-10-17

- Added new cache-hit/miss ratio in the cache commands
- Fix deprecation notice in dependency on php 8.1

## 3.0.9 - 2022-10-06

Expand Down
28 changes: 24 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@ Setting Up

1. Clone this Git repository on your local machine.
2. Install [Composer](https://getcomposer.org/) if you don't already have it.
3. Run `composer install` to fetch all the dependencies.
4. Run `./bin/terminus --help` to test that everything was installed properly.
3. Install [Box](https://github.com/box-project/box) if not already installed.
4. Run `composer install` to fetch all the dependencies.
5. Run `./bin/terminus --help` to test that everything was installed properly.

Submitting Patches
------------------
Expand Down Expand Up @@ -45,14 +46,30 @@ The PHP code beautifier can automatically fix a number of style issues. Run it v
composer cbf
```

Building the PHAR
-------------------------

Terminus is built into a PHAR package using [Box](https://github.com/box-project/box), which must
be installed first.

From the root directory, build the package with:

`composer build`

This `terminus.phar` file is required to be built prior to running tests. Running the build will
first clear out dev dependencies that were added via `composer install` and those will need to be
reinstalled before continuing development.

Running and Writing Tests
-------------------------

Terminus uses functional tests implemented using [PHPUnit](http://phpunit.de/)

The tests can be run via:
A `.env` file is required which can be based on `.env.dist` and must contain a site name for testing
which has a paid plan enabled for multidev, specify an environment to use for the tests, a user
account that owns that site, a machine token (TERMINUS_TOKEN) for that user, and an organization.

`composer test:functional`
A PHAR file must also be built before running tests.

### Functional Tests

Expand All @@ -65,6 +82,9 @@ The Terminus 3.x functional tests can be run via:
composer test:functional
```

This will take some time to complete and will produce a report at the end with any failed or
skipped tests. To run a specific test, find the test's group in the comments above the test and
use the command specified in `composer.json` under `test:functional` with `--group=<the-group>`

Versioning
----------
Expand Down
2 changes: 1 addition & 1 deletion bin/terminus
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ if (!getenv('TERMINUS_ALLOW_UNSUPPORTED_NEWER_PHP') && version_compare(PHP_VERSI

// This variable is automatically managed via updateDependenciesversion() in /RoboFile.php,
// which is run after every call to composer update.
$terminusPluginsDependenciesVersion = '801b936d59';
$terminusPluginsDependenciesVersion = '7422d8f8f1';

// Cannot use $_SERVER superglobal since that's empty during phpunit testing
// getenv('HOME') isn't set on Windows and generates a Notice.
Expand Down
3 changes: 3 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,9 @@
"@code:fix",
"@code:lint",
"composer validate --strict"
],
"version-bump": [
"bumpversion --no-commit --no-tag minor"
]
},
"config": {
Expand Down
Loading

0 comments on commit 9f01a61

Please sign in to comment.