feat(make_readme): add some tests
This commit is contained in:
parent
fd2e4ef72b
commit
cdcc8be5c3
4 changed files with 155 additions and 0 deletions
|
@ -17,6 +17,14 @@ source venv/bin/activate
|
|||
|
||||
Then the README.md in the app folder will be updated
|
||||
|
||||
## Run tests
|
||||
|
||||
```bash
|
||||
source venv/bin/activate
|
||||
pip install pytest
|
||||
pytest tests
|
||||
```
|
||||
|
||||
## Launch webhook service for auto update
|
||||
|
||||
Configure the webhook on github
|
||||
|
|
60
readme_generator/tests/README.md
Normal file
60
readme_generator/tests/README.md
Normal file
|
@ -0,0 +1,60 @@
|
|||
<!--
|
||||
N.B.: This README was automatically generated by https://github.com/YunoHost/apps/tree/master/tools/readme_generator
|
||||
It shall NOT be edited by hand.
|
||||
-->
|
||||
|
||||
# GoToSocial for YunoHost
|
||||
|
||||
[![Integration level](https://dash.yunohost.org/integration/gotosocial.svg)](https://dash.yunohost.org/appci/app/gotosocial) ![Working status](https://ci-apps.yunohost.org/ci/badges/gotosocial.status.svg) ![Maintenance status](https://ci-apps.yunohost.org/ci/badges/gotosocial.maintain.svg)
|
||||
|
||||
[![Install GoToSocial with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=gotosocial)
|
||||
|
||||
*[Lire ce readme en français.](./README_fr.md)*
|
||||
|
||||
> *This package allows you to install GoToSocial quickly and simply on a YunoHost server.
|
||||
If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/install) to learn how to install it.*
|
||||
|
||||
## Overview
|
||||
|
||||
GoToSocial is a fast [ActivityPub](https://activitypub.rocks/) social network server, written in Golang.
|
||||
|
||||
With GoToSocial, you can keep in touch with your friends, post, read, and share images and articles. All without being tracked or advertised to!
|
||||
|
||||
The official documentation is at [docs.gotosocial.org](https://docs.gotosocial.org).
|
||||
The documentation for this YunoHost package [can be read here](./doc/DOCS.md) and the admin is **strongly encouraged to read it**!
|
||||
|
||||
Please note that this package uses the ["i'm so tired" software license 1.0](https://github.com/YunoHost-Apps/gotosocial_ynh/blob/master/LICENSE), please read it and accept it before proceeding with installation.
|
||||
|
||||
**Shipped version:** 0.13.3~ynh1
|
||||
|
||||
## Screenshots
|
||||
|
||||
![Screenshot of GoToSocial](./doc/screenshots/screenshot.png)
|
||||
|
||||
## :red_circle: Antifeatures
|
||||
|
||||
- **Alpha software**: Early development stage. May contain changing or unstable features, bugs, and security vulnerability.
|
||||
- **Not totally free package**: The YunoHost package of this app is under an overall free licence, but with clauses that restrict its use.
|
||||
|
||||
## Documentation and resources
|
||||
|
||||
- Official app website: <https://gotosocial.org/>
|
||||
- Official user documentation: <https://docs.gotosocial.org/en/latest/>
|
||||
- Official admin documentation: <https://docs.gotosocial.org/en/latest/>
|
||||
- Upstream app code repository: <https://github.com/superseriousbusiness/gotosocial>
|
||||
- YunoHost Store: <https://apps.yunohost.org/app/gotosocial>
|
||||
- Report a bug: <https://github.com/YunoHost-Apps/gotosocial_ynh/issues>
|
||||
|
||||
## Developer info
|
||||
|
||||
Please send your pull request to the [testing branch](https://github.com/YunoHost-Apps/gotosocial_ynh/tree/testing).
|
||||
|
||||
To try the testing branch, please proceed like that.
|
||||
|
||||
``` bash
|
||||
sudo yunohost app install https://github.com/YunoHost-Apps/gotosocial_ynh/tree/testing --debug
|
||||
or
|
||||
sudo yunohost app upgrade gotosocial -u https://github.com/YunoHost-Apps/gotosocial_ynh/tree/testing --debug
|
||||
```
|
||||
|
||||
**More info regarding app packaging:** <https://yunohost.org/packaging_apps>
|
60
readme_generator/tests/README_fr.md
Normal file
60
readme_generator/tests/README_fr.md
Normal file
|
@ -0,0 +1,60 @@
|
|||
<!--
|
||||
N.B.: This README was automatically generated by https://github.com/YunoHost/apps/tree/master/tools/readme_generator
|
||||
It shall NOT be edited by hand.
|
||||
-->
|
||||
|
||||
# GoToSocial pour YunoHost
|
||||
|
||||
[![Niveau d’intégration](https://dash.yunohost.org/integration/gotosocial.svg)](https://dash.yunohost.org/appci/app/gotosocial) ![Statut du fonctionnement](https://ci-apps.yunohost.org/ci/badges/gotosocial.status.svg) ![Statut de maintenance](https://ci-apps.yunohost.org/ci/badges/gotosocial.maintain.svg)
|
||||
|
||||
[![Installer GoToSocial avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=gotosocial)
|
||||
|
||||
*[Read this readme in english.](./README.md)*
|
||||
|
||||
> *Ce package vous permet d’installer GoToSocial rapidement et simplement sur un serveur YunoHost.
|
||||
Si vous n’avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour savoir comment l’installer et en profiter.*
|
||||
|
||||
## Vue d’ensemble
|
||||
|
||||
Un serveur de réseau social véloce basé sur [ActivityPub](https://activitypub.rocks/) écrit en Golang.
|
||||
|
||||
Avec GoToSocial, vous pouvez rester en contact avec vos amis, publier, lire et partager des images et des articles. Tout cela sans être pisté ni subir de publicité !
|
||||
|
||||
Vous pouvez consulter la documentation officielle à l'adresse : [docs.gotosocial.org](https://docs.gotosocial.org).
|
||||
La documentation de ce paquet YunoHost [est lisible ici](./doc/DOCS_fr.md) et l'admin est **vivement encouragé-e à la lire** !
|
||||
|
||||
Veuillez noter que ce paquet utilise la ["i'm so tired" software license 1.0](https://github.com/YunoHost-Apps/gotosocial_ynh/blob/master/LICENSE), veuillez la lire et l'accepter avant de procéder à l'installation.
|
||||
|
||||
**Version incluse :** 0.13.3~ynh1
|
||||
|
||||
## Captures d’écran
|
||||
|
||||
![Capture d’écran de GoToSocial](./doc/screenshots/screenshot.png)
|
||||
|
||||
## :red_circle: Anti-fonctionnalités
|
||||
|
||||
- **Logiciel en version alpha** : Le logiciel est au tout début de son développement. Il pourrait contenir des fonctionnalités changeantes ou instables, des bugs, et des failles de sécurité.
|
||||
- **Package sous licence libre restreinte** : Le package YunoHost de cette application est sous une licence globalement libre, mais avec des clauses qui pourraient restreindre son utilisation.
|
||||
|
||||
## Documentations et ressources
|
||||
|
||||
- Site officiel de l’app : <https://gotosocial.org/>
|
||||
- Documentation officielle utilisateur : <https://docs.gotosocial.org/en/latest/>
|
||||
- Documentation officielle de l’admin : <https://docs.gotosocial.org/en/latest/>
|
||||
- Dépôt de code officiel de l’app : <https://github.com/superseriousbusiness/gotosocial>
|
||||
- YunoHost Store : <https://apps.yunohost.org/app/gotosocial>
|
||||
- Signaler un bug : <https://github.com/YunoHost-Apps/gotosocial_ynh/issues>
|
||||
|
||||
## Informations pour les développeurs
|
||||
|
||||
Merci de faire vos pull request sur la [branche testing](https://github.com/YunoHost-Apps/gotosocial_ynh/tree/testing).
|
||||
|
||||
Pour essayer la branche testing, procédez comme suit.
|
||||
|
||||
``` bash
|
||||
sudo yunohost app install https://github.com/YunoHost-Apps/gotosocial_ynh/tree/testing --debug
|
||||
ou
|
||||
sudo yunohost app upgrade gotosocial -u https://github.com/YunoHost-Apps/gotosocial_ynh/tree/testing --debug
|
||||
```
|
||||
|
||||
**Plus d’infos sur le packaging d’applications :** <https://yunohost.org/packaging_apps>
|
27
readme_generator/tests/test_make_readme.py
Normal file
27
readme_generator/tests/test_make_readme.py
Normal file
|
@ -0,0 +1,27 @@
|
|||
import os
|
||||
import tempfile
|
||||
import subprocess
|
||||
|
||||
from pathlib import Path
|
||||
|
||||
CWD = Path(os.path.split(os.path.realpath(__file__))[0])
|
||||
COMMIT_ID = "8f788213b363a46a5b6faa8f844d86d4adac9446"
|
||||
|
||||
|
||||
def test_running_make_readme():
|
||||
with tempfile.TemporaryDirectory() as name:
|
||||
name = Path(name)
|
||||
DIRECTORY = name / "gotosocial_ynh"
|
||||
|
||||
subprocess.check_call(["git", "clone", "https://github.com/yunohost-apps/gotosocial_ynh", DIRECTORY, "-q"])
|
||||
subprocess.check_call(["git", "checkout", COMMIT_ID, "-q"], cwd=DIRECTORY)
|
||||
|
||||
print(CWD)
|
||||
subprocess.check_call([CWD / "../make_readme.py", DIRECTORY])
|
||||
|
||||
assert open(CWD / "README.md").read() == open(DIRECTORY / "README.md").read()
|
||||
assert open(CWD / "README_fr.md").read() == open(DIRECTORY / "README_fr.md").read()
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
test_running_make_readme()
|
Loading…
Reference in a new issue