diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 00000000..84496648 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,27 @@ +name: CI + +on: + push: + branches: [master] + pull_request: {} + +jobs: + test: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: [3.5, 3.6, 3.7, 3.8, 3.9] + + steps: + - uses: actions/checkout@v2 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + - name: Install test dependencies + run: | + python -m pip install --upgrade pip + pip install pytest + - name: Test with pytest + run: | + pytest diff --git a/MANIFEST.in b/MANIFEST.in index 6077b5ff..cb2f4509 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1 +1,4 @@ include MANIFEST.in README.rst LICENSE certifi/cacert.pem + +exclude .github/ +recursive-exclude .github \ No newline at end of file diff --git a/certifi/tests/__init__.py b/certifi/tests/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/certifi/tests/test_certify.py b/certifi/tests/test_certify.py new file mode 100755 index 00000000..7fb8c77f --- /dev/null +++ b/certifi/tests/test_certify.py @@ -0,0 +1,15 @@ +# -*- coding: utf-8 -*- + +import os +import unittest + +import certifi + + +class TestCertifi(unittest.TestCase): + def test_cabundle_exists(self): + assert os.path.exists(certifi.where()) + + def test_read_contents(self): + content = certifi.contents() + assert "-----BEGIN CERTIFICATE-----" in content