diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..5eca7b0 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,29 @@ + +name: CI +on: [push, pull_request] + +jobs: + + test: + name: Test + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Start containers + run: docker-compose -f "docker-compose-dev.yml" up -d + + - name: Setup Python + uses: actions/setup-python@v2 + with: + python-version: 3.8 + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -r requirements.txt + + - name: Run test suite + run: | + python -m pytest -v diff --git a/README.md b/README.md index c75a2c1..836b972 100644 --- a/README.md +++ b/README.md @@ -72,8 +72,11 @@ docker build -t trema --build-arg token= . docker run trema ``` +## Test + ### Lancement des tests + Pour lancer tous les tests du projet, lancez la commande suivante. ``` @@ -90,4 +93,4 @@ Pour lancer un seul test d'un fichier, lancez la commande suivante. ``` pytest -v ./tests/[nom du fichier].py::[nom de la fonction] -``` \ No newline at end of file +