From 27755364a23abf78faafa33796a7f41dc6bc343b Mon Sep 17 00:00:00 2001 From: Dakota <32800695+MalikAza@users.noreply.github.com> Date: Sat, 13 Apr 2024 13:44:05 +0200 Subject: [PATCH 1/3] Create python-tests.yml --- .github/workflows/python-tests.yml | 36 ++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .github/workflows/python-tests.yml diff --git a/.github/workflows/python-tests.yml b/.github/workflows/python-tests.yml new file mode 100644 index 0000000..caddef6 --- /dev/null +++ b/.github/workflows/python-tests.yml @@ -0,0 +1,36 @@ +# Install Python dependencies, run tests with versions ["3.10", "3.11", "3.12"] of Python +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python + +name: Python tests + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +permissions: + contents: read + +jobs: + build: + + runs-on: ubuntu-latest + strategy: + matrix: + python-version: ["3.10", "3.11", "3.12"] + + steps: + - uses: actions/checkout@v4 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install unittest + if [ -f requirements.txt ]; then pip install -r requirements.txt; fi + - name: Test with unittest + run: | + python -m unittest discover -v tests/ From 8a013d129aacc9f000eb91277930c3852f965a9e Mon Sep 17 00:00:00 2001 From: Dakota <32800695+MalikAza@users.noreply.github.com> Date: Sat, 13 Apr 2024 13:47:58 +0200 Subject: [PATCH 2/3] Update python-tests.yml unittest do not need to be installed. It is built-in --- .github/workflows/python-tests.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/python-tests.yml b/.github/workflows/python-tests.yml index caddef6..65f30df 100644 --- a/.github/workflows/python-tests.yml +++ b/.github/workflows/python-tests.yml @@ -29,7 +29,6 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - pip install unittest if [ -f requirements.txt ]; then pip install -r requirements.txt; fi - name: Test with unittest run: | From fcd215b6357edb66354195b889795fd6e4770a39 Mon Sep 17 00:00:00 2001 From: Dakota <32800695+MalikAza@users.noreply.github.com> Date: Sat, 13 Apr 2024 13:50:14 +0200 Subject: [PATCH 3/3] add pytz requirements --- requirements.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 37912b8..ca8ed5a 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1 +1,2 @@ -requests>=2.31.0 \ No newline at end of file +requests>=2.31.0 +pytz>=2023.3