You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+29-29Lines changed: 29 additions & 29 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,22 +1,24 @@
1
1
# Contributing to the Unity Web Portal
2
2
3
-
## Branch Structure
4
-
5
-
Each release version has its own branch. Once that version is released, the branch is locked.
6
-
7
-
When submitting pull requests, the pull request should be made to the version you are targetting, assuming it is not already released.
8
-
9
3
## Conventions
10
4
11
-
This code base is currently using PHP version 7.4. All files are required to be linted with PSR-12 standard. This repository will automatically check PRs for linting compliance.
5
+
This code base is currently using PHP version 8.3.
6
+
All files are required to be linted with PSR-12 standard.
7
+
This repository will automatically check PRs for linting compliance.
12
8
13
9
## Development Environment
14
10
15
11
### Setting up your Environment
16
12
17
-
1. Download and install [docker desktop](https://www.docker.com/products/docker-desktop/) for your appropriate OS.
18
-
1. In `tools/docker-dev` Run the build script: `./build.sh` (mac os/linux) or `./build.bat` (windows)
19
-
1. Run the environment: `./run.sh` (mac os/linux) or `./run.bat` (windows). Press `CTRL+C` to exit.
13
+
1. Clone this repo (including submodules): `git clone <this-repo> --recurse-submodules`
14
+
1. install [composer](https://getcomposer.org/)
15
+
1. install PHP dependencies: `composer update`
16
+
1. If you're on Windows, use [WSL](https://learn.microsoft.com/en-us/windows/wsl/)
17
+
1. Download and install [docker desktop](https://www.docker.com/products/docker-desktop/)
18
+
1. In `tools/docker-dev` Run the build script: `./build.sh`
19
+
1. Run the environment: `./run.sh`. Press `CTRL+C` to exit
20
+
1. Install [pre-commit](https://pre-commit.com/)
21
+
1. setup pre-commit hooks: `pre-commit install`
20
22
21
23
### Environment Usage
22
24
@@ -27,27 +29,25 @@ While the environment is running, the following is accessible:
27
29
*http://127.0.0.1:8020 - PHPMyAdmin Portal
28
30
*http://127.0.0.1:8030 - Mailcatcher Portal
29
31
32
+
To run tests:
33
+
```
34
+
docker exec -it "$(docker container ls | grep web | awk '{print $1}')" bash
35
+
cd /var/www/unity-web
36
+
./vendor/bin/phpunit /optional/path/to/tests
37
+
```
38
+
39
+
If you bork your LDAP or SQL server, just run `./build.sh` again
40
+
30
41
### Test Users
31
42
32
-
The test environment ships with a number of users that can be used for testing. When accessing locked down portions of the portal, you will be asked for a username and password. The password is always `password`.
33
-
34
-
The following users are available for testing:
35
-
36
-
*`admin1@domain.com` - admin user who is a member of pi_user1_domain_edu
37
-
*`admin2@domain.com` - admin user
38
-
*`user1@domain.com` - user who is the owner of pi_user1_domain_edu
39
-
*`user2@domain.com` - user who is the owner of pi_user2_domain_edu
40
-
*`user3@domain.com` - user who is a member of pi_user1_domain_edu
41
-
*`user4@domain.com` - user
42
-
*`user5@domain.com` - user who is a member of pi_user2_domain_edu
43
-
*`user6@domain.com` - user who is a member of pi_user2_domain_edu
44
-
*`user7@domain.com` - user who has no LDAP object
45
-
*`user8@domain.com` - user who has no LDAP object
46
-
*`user9@domain.com` - user who has no LDAP object
47
-
*`user1@domain2.com` - user who is the owner of pi_user1_domain2_edu
48
-
*`user2@domain2.com` - user
49
-
*`user3@domain2.com` - user who has no LDAP object
50
-
*`user4@domain2.com` - user who has no LDAP object
43
+
The test environment ships with a number of users that can be used for testing.
44
+
When accessing locked down portions of the portal, you will be asked for a username and password.
45
+
The password is always `password`. `tools/docker-dev/web/htpasswd` contains all valid usernames.
46
+
47
+
Notable users:
48
+
*`user1@org1.test` - admin, PI
49
+
*`user2@org1.test` - not admin, not PI
50
+
*`user2000@org2.test` - does not yet have an account
0 commit comments