Skip to content

Commit

Permalink
Create python-test.yml for the CI
Browse files Browse the repository at this point in the history
$ pytest -vv .
=================================================================================================== test session starts ====================================================================================================
platform linux -- Python 3.12.7+, pytest-8.3.3, pluggy-1.5.0 -- /home/macbre/github/mbc-harvest/env/bin/python
cachedir: .pytest_cache
rootdir: /home/macbre/github/mbc-harvest
collected 3 items                                                                                                                                                                                                          

test_dlibra.py::test_get_presentation_data_url PASSED                                                                                                                                                                [ 33%]
test_dlibra.py::test_get_content_url PASSED                                                                                                                                                                          [ 66%]
test_dlibra.py::test_get_set PASSED                                                                                                                                                                                  [100%]

===================================================================================================== warnings summary =====================================================================================================
test_dlibra.py::test_get_content_url
test_dlibra.py::test_get_set
  /home/macbre/github/mbc-harvest/env/lib/python3.12/site-packages/urllib3/connectionpool.py:1099: InsecureRequestWarning: Unverified HTTPS request is being made to host 'mbc.cyfrowemazowsze.pl'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#tls-warnings
    warnings.warn(

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
============================================================================================== 3 passed, 2 warnings in 5.80s ===============================================================================================
  • Loading branch information
macbre authored Nov 20, 2024
1 parent 2ebbce1 commit 6a1d98e
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/python-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Test the Python code

on:
push:
branches: [ "master" ]
pull_request:

permissions:
contents: read

jobs:
test:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: "3.13"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
- name: Test with pytest
run: |
pytest -vv .

0 comments on commit 6a1d98e

Please sign in to comment.