Skip to content

Commit 5293cd8

Browse files
committed
Updating CHANGELOG and README.
1 parent f08387b commit 5293cd8

File tree

2 files changed

+26
-15
lines changed

2 files changed

+26
-15
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77
## [Unreleased]
88
### Added
99
- Aliases in `.ashrc.dist`.
10+
- Infection.
1011

1112
### Changed
1213
- PHP 7.3 => 8.3.
1314
- PHPUnit 9 => 11.
15+
- Generating code and test from configuration files.
16+
- Customised user in the container instead of root.
17+
18+
### Removed
19+
- Community code and test.
1420

1521
## [3.17.0] - 2023-01-31
1622
### Added

README.md

Lines changed: 20 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,10 @@ A project to test your [CodinGame](https://www.codingame.com/) PHP code. It is n
44
It only contains PHPUnit tests to let you code in your favorite IDE, outside of the CodinGame web site.
55

66
[![License](https://img.shields.io/github/license/cyrilverloop/codingame-php-tests)](https://github.com/cyrilverloop/codingame-php-tests/blob/trunk/LICENSE)
7-
[![PHP version](https://img.shields.io/badge/php-%3D7.3-%23777BB4?logo=php&style=flat)](https://www.php.net/)
7+
[![PHP version](https://img.shields.io/badge/php-%3D8.3-%23777BB4?logo=php&style=flat)](https://www.php.net/)
88

9-
**This project now uses PHP 8.3+ and unfortunaly CodinGame is still on PHP 7.3
9+
**This project now uses PHP 8.3+.
10+
Unfortunaly, CodinGame is still on PHP 7.3
1011
which is not [supported](https://www.php.net/supported-versions.php) anymore.
1112
If you want to run your code on PHP 7.3,
1213
you can use a version up to 3.x of this software which do not receive further update.**
@@ -27,29 +28,33 @@ user@host projects$ cd codingame-php-tests
2728
Copy some configuration files for Docker and PHPUnit :
2829
```shellsession
2930
user@host projects$ cp ./ci/phpunit.dist.xml ./ci/phpunit.xml
31+
user@host projects$ cp ./.env.dist ./.env
3032
user@host projects$ cp ./.ashrc.dist ./.ashrc
3133
user@host projects$ cp ./docker-compose.override.yml.dist ./docker-compose.override.yml
3234
```
33-
The `./ci/phpunit.xml`, `./.ashrc` and `./docker-compose.override.yml` files are ignored by git, you can modify them to your needs.
35+
Edit the `./.env` to add your user to the container.
36+
The `./ci/phpunit.xml`, `./.ashrc`, `./.env` and `./docker-compose.override.yml` files are ignored by git, you can modify them to your needs.
3437
The `./.ashrc` and `./docker-compose.override.yml` add some aliases to your container.
3538

3639
Install the dependencies :
3740
```shellsession
3841
user@host codingame-php-tests$ docker compose run --rm app composer install -o
39-
user@host codingame-php-tests$ docker compose run --rm app phive install --trust-gpg-keys 4AA394086372C20A,12CE0F1D262429A5,31C7E470E2138192
42+
user@host codingame-php-tests$ docker compose run --rm app phive install --trust-gpg-keys 4AA394086372C20A,12CE0F1D262429A5,5E6DDE998AB73B8E,C5095986493B4AA0
4043
```
4144

42-
43-
## Add your code
44-
45-
Every classes in `./src/**/*.dist` files have an `execute()` method with the default CodinGame code.
46-
To try a puzzle, copy the corresponding file and change the extension to `php` :
45+
Generate the code and test files :
4746
```shellsession
48-
user@host codingame-php-tests$ cp ./src/Training/Easy/Unary/Unary.dist ./src/Training/Easy/Unary/Unary.php
47+
user@host codingame-php-tests$ docker compose run --rm app bin/generate-tests
4948
```
50-
Then, add your code to solve the puzzle.
5149

52-
**If you change the class name or do not have an `execute()` method in it, the tests will not be able to run.**
50+
**Existing code, test, input and output files will not be overwritten.
51+
To generate a file again, you must delete it first.**
52+
53+
54+
## Add your code
55+
56+
Every classes in `./src/**/*CGCode.php` files have an `execute()` method with the default CodinGame code.
57+
A test executes the `CGCode::execute()` method. You can add your code in and arround it.
5358

5459

5560
## Test your solution
@@ -64,7 +69,7 @@ Execute all the tests :
6469
phpunit
6570
```
6671

67-
Execute tests for a particular puzzle or a test case :
72+
Execute tests of a group :
6873
```shellsession
6974
phpunit --group [GROUP_NAME]
7075
```
@@ -85,7 +90,7 @@ Tip : to activate HTML coverage report and testdox logging, you can uncomment th
8590
## Add your test (optional)
8691

8792
Every tests in `./tests/**/CGTest.php` files include the tests from CodinGame.
88-
You can add your own tests in other `./tests/**/*Test.php` files and add them to a group with the `Group` attribute.
93+
You can add your own tests and add them to a group with the `Group` attribute.
8994

9095

9196
## Back to CodinGame
@@ -105,4 +110,4 @@ fscanf(STDIN, "%d", $N);
105110

106111
## Time limit
107112

108-
The maximum time allowed for a puzzle may differ from CodinGame.
113+
The maximum time allowed may differ from CodinGame.

0 commit comments

Comments
 (0)