Skip to content

Commit 8ff3fa1

Browse files
committed
initialization
0 parents  commit 8ff3fa1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+18514
-0
lines changed

.gitattributes

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
/tests export-ignore
2+
.github export-ignore
3+
4+
.gitignore export-ignore
5+
.gitattributes export-ignore
6+
CONTRIBUTING.md export-ignore
7+
package.json export-ignore
8+
package-lock.json export-ignore
9+
playwright.config.ts export-ignore
10+
docker-compose-dev.yml export-ignore

.github/workflows/playwright.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: Playwright Tests
2+
on:
3+
push:
4+
branches: [ main ]
5+
pull_request:
6+
branches: [ main ]
7+
jobs:
8+
test:
9+
timeout-minutes: 90
10+
runs-on: ubuntu-latest
11+
strategy:
12+
matrix:
13+
php-version: [ '7.4', '8.0', '8.1', '8.2', '8.3', '8.4' ]
14+
steps:
15+
- uses: actions/checkout@v4
16+
- uses: actions/setup-node@v4
17+
with:
18+
node-version: lts/*
19+
20+
- name: Set up Docker Buildx
21+
uses: docker/setup-buildx-action@v3
22+
23+
- name: Build PHP-FPM images with cache
24+
uses: docker/build-push-action@v6
25+
with:
26+
context: server/config/php-fpm/${{ matrix.php-version }}
27+
file: server/config/php-fpm/${{ matrix.php-version }}/Dockerfile
28+
build-args: |
29+
PHP_VERSION=${{ matrix.php-version }}
30+
UID=1000
31+
GID=1000
32+
load: true
33+
tags: local/php-fpm:${{ matrix.php-version }}
34+
cache-from: type=gha
35+
cache-to: type=gha,mode=max
36+
37+
- name: Install dependencies
38+
run: npm ci
39+
- name: Install Playwright Browsers
40+
run: npx playwright install --with-deps
41+
42+
- name: Run tests
43+
run: npm run tests ${{ matrix.php-version }}
44+
45+
- uses: actions/upload-artifact@v4
46+
if: ${{ always() }}
47+
with:
48+
name: playwright-report
49+
path: playwright-report/
50+
retention-days: 30

.gitignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
.idea
2+
3+
/node_modules/
4+
5+
/test-results/
6+
/playwright-report/
7+
/blob-report/
8+
/playwright/.cache/
9+
/playwright/.auth/

CONTRIBUTING.md

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
# Contributing Guide
2+
3+
We welcome your interest in developing this project! We appreciate any contribution, whether it's fixing bugs, adding
4+
new features, or improving documentation. To make the process as smooth as possible, please review this guide.
5+
6+
## How to Contribute
7+
8+
The basic process for making changes is as follows:
9+
10+
1. **Fork the repository:** Create your own copy of the repository on GitHub.
11+
2. **Clone the fork:** `git clone https://github.com/YOUR_USERNAME/DenisLopatin-server.git`
12+
3. **Create a branch:** Create a new branch for your changes (`git checkout -b feature/my-new-feature` or `git checkout -b fix/bug-fix`).
13+
4. **Make changes:** Write code, fix a bug, update configuration.
14+
5. **Test:** Ensure your changes haven't broken existing functionality. Run the Playwright tests (see the "Testing" section).
15+
6. **Commit changes:** `git commit -m "feat: Add support for a new service"` (try to follow [Conventional Commits](https://www.conventionalcommits.org/) if possible).
16+
7. **Push changes to your fork:** `git push origin feature/my-new-feature`
17+
8. **Create a Pull Request (PR):** Open a PR from your branch to the `main` branch of the main repository.
18+
19+
## Reporting Bugs (Issues)
20+
21+
If you find a bug:
22+
23+
1. **Check existing Issues:** Perhaps this bug has already been reported.
24+
2. **Create a new Issue:** If the bug hasn't been reported, create a new Issue with a clear and descriptive title.
25+
3. **Describe the problem:**
26+
* Specify your Docker version, Docker Compose version, and your OS.
27+
* Describe the steps to reproduce the error.
28+
* Describe the expected and actual behavior.
29+
* Attach error logs (`docker logs <container_name>`) or screenshots if necessary.
30+
31+
## Suggesting Enhancements (Feature Requests)
32+
33+
If you have an idea to improve the project:
34+
35+
1. **Check existing Issues:** Perhaps a similar idea is already being discussed.
36+
2. **Create a new Issue:** Describe your idea, explain the problem it solves, and why it would be beneficial for the project.
37+
38+
## Setting Up the Development Environment
39+
40+
Before making changes, you need to set up the project locally. Detailed instructions are in the [README.md](README.md) file.
41+
42+
## Code Style and Configuration
43+
44+
* **Docker Configurations:** Try to follow the existing style in `docker-compose.yml` and `Dockerfile`s. Use comments for non-trivial solutions.
45+
* **Bash Scripts:** Use `set -euo pipefail`. Break down complex logic into functions. Add comments.
46+
* **Playwright Tests:** Follow the structure and style of existing tests. Use reliable selectors and explicit assertions (`expect`).
47+
48+
## Testing
49+
50+
The project uses Playwright for E2E testing.
51+
52+
* **Running tests:** Use the command `npm test`.
53+
* **Adding/Updating tests:** If your changes affect functionality covered by tests, update them. If you add new functionality, please add tests for it as well.
54+
55+
Ensure all tests pass successfully before creating a Pull Request.
56+
57+
To run the full project test cycle, execute the command `./tests/tests.sh`. Enter the system's `root` user password when
58+
prompted; this is necessary to create entries in `/etc/hosts` on WSL/Linux or `/private/etc/hosts` on macOS.
59+
60+
## Pull Requests (PR)
61+
62+
* **Description:** Provide a clear description of what your PR does and what problem it solves. Reference the related Issue (e.g., `Fixes #123`).
63+
* **Small PRs:** Try to make small, focused PRs. They are easier to review and merge.
64+
* **Passing Tests:** Ensure all automated checks (GitHub Actions, if configured) and local tests pass.
65+
* **Review:** Be prepared for discussion and making changes based on the review feedback.
66+
67+
## License
68+
69+
By contributing to this project, you agree that your changes will be licensed under the [MIT License](LICENSE) used by
70+
this project.
71+
72+
Thank you for your contribution!

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) [year] [fullname]
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

0 commit comments

Comments
 (0)