docs(appium): Add contributing documentation (#18691)

This commit is contained in:
Christian Bromann
2023-05-26 22:57:01 -07:00
committed by GitHub
parent e96724077e
commit a959eec9cf
2 changed files with 105 additions and 2 deletions
+5
View File
@@ -0,0 +1,5 @@
{
"recommendations": [
"stateful.runme"
]
}
+100 -2
View File
@@ -1,5 +1,6 @@
---
title: Contributing to Appium
cwd: ../../../../../
---
This section of Appium's documentation is for those who are interested in contributing to Appium's
@@ -16,8 +17,105 @@ already.
## Ways to Contribute
TODO
The project offers a variety of ways to contribute, e.g.:
- contributing code
- improving documentation
- creating educational content (blog posts, tutorials, videos, etc.)
- spreading the good word about the project (e.g. via Twitter)
- filing bugs if you discover them while using Appium
- making feature requests if you are missing something in the project or help triaging bugs
- supporting users in the [Appium forum](https://discuss.appium.io/)
## The Appium Development Process
TODO
To contribute to the Appium code base make sure to check out the Git repository.
!!! info
If you are VS Code user you can easily check out the project using [Runme](https://runme.dev/api/runme?repository=https%3A%2F%2Fgithub.com%2Fappium%2Fappium.git&fileToOpen=packages%2Fappium%2Fdocs%2Fen%2Fcontributing%2Findex.md).
It is advised to [fork](https://github.com/appium/appium/fork) before cloning it to your system.
```sh { name=clone }
export GITHUB_USERNAME=<your-username>
git clone git@github.com:$GITHUB_USERNAME/appium.git
```
After cloning you can go ahead and install the project dependencies:
```sh { name=install }
npm install
```
From here on there are several things you can do.
### Watch Files
When developing Appium code we have to watch all JavaScript and TypeScript files to re-compile them after every change. You can run this watch process via:
```sh { name=watch, background=true }
npm run dev
```
### Start Appium in Dev-Mode
To test your changes you can run Appium in dev mode via:
```sh { name=start }
npm start
```
### Run Tests
The project maintains a set of different test variations you can run to verify the quality of the code.
#### Linting
Appium uses EsLint for static code analysis and linting. You can run these checks via:
```sh { name=test-linting }
npm run lint
```
#### Unit
Run via:
```sh { name=test-unit }
npm run test:unit
```
You can also run tests for specific workspaces, e.g.:
```sh { name=test-workspace }
export APPIUM_WORKSPACE=@appium/doctor
npm run test:unit -w $APPIUM_WORKSPACE
```
#### Smoke and e2e Tests
Run via:
```sh { name=test-slow }
npm run test:slow
```
### Deploy Docs Locally
Our documentation system uses [MKDocs](https://www.mkdocs.org/) and therefor requires [Python](https://www.python.org/) to be installed on your system. You can run the docs by:
```sh
# installing needed Python dependencies
pip install -r packages/docutils/requirements.txt
# build the project
npm run build
# run dev server
npm run dev:docs
```
You should be able to view the page at `http://127.0.0.1:8000/docs/en`:
```sh
open http://127.0.0.1:8000/docs/en
```