From d38b11667ed5e2e1681b6e12e9cd362887adc9cf Mon Sep 17 00:00:00 2001 From: mac12m99 <10120390+mac12m99@users.noreply.github.com> Date: Sun, 24 Jan 2021 20:52:51 +0100 Subject: [PATCH] prova push report sul sito --- .github/workflows/tests.yml | 35 ++++++++++++++++++++--------------- tests/test_generic.py | 3 ++- 2 files changed, 22 insertions(+), 16 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 99d1cfd7..2c5bd758 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -8,21 +8,26 @@ jobs: tests: runs-on: ubuntu-latest steps: - # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@v2 + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it + - uses: actions/checkout@v2 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v1 - with: - python-version: 3.8 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v1 + with: + python-version: 3.8 - - name: Run tests - run: | - export PYTHONPATH=$GITHUB_WORKSPACE - export KODI_INTERACTIVE=0 - ./tests/run.sh + - name: Run tests + run: | + export KODI_INTERACTIVE=0 + ./tests/run.sh - - uses: actions/upload-artifact@v2 - with: - name: report - path: reports/report.html + - name: Commit & Push changes + uses: cpina/github-action-push-to-another-repository@cp_instead_of_deleting + env: + API_TOKEN_GITHUB: ${{ secrets.API_TOKEN_GITHUB }} + with: + source-directory: "reports" + destination-github-username: "kodiondemand" + destination-repository-name: "kodiondemand.github.io" + user-email: "tests@kod.bot" + commit-message: "Test suite" \ No newline at end of file diff --git a/tests/test_generic.py b/tests/test_generic.py index 1cd21fbc..fe1108c0 100644 --- a/tests/test_generic.py +++ b/tests/test_generic.py @@ -7,6 +7,7 @@ # export KOD_TST_CH=channel # python tests/test_generic.py import html +import json import os import sys import unittest @@ -216,7 +217,7 @@ logger.record = False from specials import news dictNewsChannels, any_active = news.get_channels_list() -print(channels) +json.dump(channels, open(os.path.join(os.getcwd(), 'reports', 'result.json'))) # only 1 server item for single server serverNames = [] serversFinal = []