1
0
Fork 0

feat(make_readme): add some tests

This commit is contained in:
Laurent Peuch 2024-03-08 05:10:47 +01:00 committed by Bram
parent fd2e4ef72b
commit cdcc8be5c3
4 changed files with 155 additions and 0 deletions

View file

@ -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

View 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>

View 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 dinté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 dinstaller GoToSocial rapidement et simplement sur un serveur YunoHost.
Si vous navez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour savoir comment linstaller et en profiter.*
## Vue densemble
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 lapp : <https://gotosocial.org/>
- Documentation officielle utilisateur : <https://docs.gotosocial.org/en/latest/>
- Documentation officielle de ladmin : <https://docs.gotosocial.org/en/latest/>
- Dépôt de code officiel de lapp : <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 dinfos sur le packaging dapplications :** <https://yunohost.org/packaging_apps>

View 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()