From 4f6cdba26253c75690c837025edddfb219a4266a Mon Sep 17 00:00:00 2001 From: Ertugrul Karademir Date: Tue, 23 May 2023 07:49:46 +0100 Subject: [PATCH] Ertugrul/update actions (#66) * Testing update * Version bump for poetry installer * Try again * Downgrade ubuntu * Up again * Install poetry manually * Use Ubuntu 20 * Up python version * Also publish * Upped version --- .github/workflows/pypi-publish.yml | 51 ++++++++++++++---------------- .github/workflows/testing.yml | 38 +++++++++++----------- .python-version | 2 +- README.md | 15 +++++---- pyproject.toml | 6 ++-- 5 files changed, 54 insertions(+), 58 deletions(-) diff --git a/.github/workflows/pypi-publish.yml b/.github/workflows/pypi-publish.yml index 9204837..dfaa8d0 100644 --- a/.github/workflows/pypi-publish.yml +++ b/.github/workflows/pypi-publish.yml @@ -6,31 +6,28 @@ on: jobs: test: name: Testing - runs-on: ubuntu-18.04 + runs-on: ubuntu-20.04 steps: - - uses: actions/checkout@v2 - - name: Set up Python 3.6.10 - uses: actions/setup-python@v2 - with: - python-version: 3.6.10 - - name: Install poetry - uses: snok/install-poetry@v1.1.1 - with: - virtualenvs-create: true - virtualenvs-in-project: true - - name: Install dependencies - run: | - poetry install - - name: Lint test - run: | - poetry run flake8 - - name: Unit and functional tests - run: | - poetry run pytest - - name: Build - run: | - poetry build - - name: Publish - run: | - poetry publish -u __token__ -p ${{ secrets.PYMONGOIM_PYPI_TOKEN }} - + - uses: actions/checkout@v3 + - name: Set up Python 3.7 + uses: actions/setup-python@v4 + with: + python-version: 3.7 + - name: Install and configure Poetry + run: | + curl -sSL https://install.python-poetry.org | python3 - + - name: Install dependencies + run: | + poetry install + - name: Lint test + run: | + poetry run flake8 + - name: Unit and functional tests + run: | + poetry run pytest + - name: Build + run: | + poetry build + - name: Publish + run: | + poetry publish -u __token__ -p ${{ secrets.PYMONGOIM_PYPI_TOKEN }} diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 31cd720..59eb8f2 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -4,24 +4,22 @@ on: [push] jobs: test: name: Testing - runs-on: ubuntu-18.04 + runs-on: ubuntu-20.04 steps: - - uses: actions/checkout@v2 - - name: Set up Python 3.6.10 - uses: actions/setup-python@v2 - with: - python-version: 3.6.10 - - name: Install poetry - uses: snok/install-poetry@v1.1.1 - with: - virtualenvs-create: true - virtualenvs-in-project: true - - name: Install dependencies - run: | - poetry install - - name: Lint test - run: | - poetry run flake8 - - name: Unit and functional tests - run: | - poetry run pytest + - uses: actions/checkout@v3 + - name: Set up Python 3.7 + uses: actions/setup-python@v4 + with: + python-version: 3.7 + - name: Install and configure Poetry + run: | + curl -sSL https://install.python-poetry.org | python3 - + - name: Install dependencies + run: | + poetry install + - name: Lint test + run: | + poetry run flake8 + - name: Unit and functional tests + run: | + poetry run pytest diff --git a/.python-version b/.python-version index c47e8b5..36f601f 100644 --- a/.python-version +++ b/.python-version @@ -1 +1 @@ -3.6.10 +3.7.16 diff --git a/README.md b/README.md index 6eec14e..203ad7c 100644 --- a/README.md +++ b/README.md @@ -6,9 +6,10 @@ A mongo mocking library with an ephemeral MongoDB running in memory. ## What's new? -### v0.2.12 +### v0.2.13 - Ability to invoke locally set up `mongod` [Contribution by [@kschniedergers](https://github.com/kschniedergers)] +- We also upped the development version dependency on Python for CI/CD purposes. ### v0.2.10 @@ -30,11 +31,11 @@ There are several ways you can configure `pymongo_inmemory`. 1. Insert a new section titled `pymongo_inmemory` to your project's `setup.cfg` version you want to spin up: `ini - [pymongo_inmemory] - operating_system = ubuntu - os_version = 18 - mongod_port = 27019 - ` +[pymongo_inmemory] +operating_system = ubuntu +os_version = 18 +mongod_port = 27019 +` 2. Define an `ALL_CAPS` environment variables with prefix `PYMONGOIM__` (attention to trailing double underscores.) For instance, to override the port, set up an environment variable `PYMONGOIM__MONGOD_PORT`. @@ -150,7 +151,7 @@ but for now we are keeping things simple. ## Supported Python versions -Since few development tools only support Python version 3.6 and above, all testing and tooling done +Since few development tools only support Python version 3.7 and above, all testing and tooling done from that version up. This also limits the minimum Python version of tested features. However there shouldn't diff --git a/pyproject.toml b/pyproject.toml index ef05e65..358552e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "pymongo_inmemory" -version = "0.2.12" +version = "0.2.13" description = "A mongo mocking library with an ephemeral MongoDB running in memory." authors = ["Kaizen Dorks "] maintainers = [ @@ -14,7 +14,7 @@ homepage = "https://github.com/kaizendorks/pymongo_inmemory" repository = "https://github.com/kaizendorks/pymongo_inmemory" keywords = ["mongodb", "testing", "pymongo"] classifiers = [ - "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7", "License :: OSI Approved :: MIT License", "Development Status :: 3 - Alpha", "Intended Audience :: Developers", @@ -31,7 +31,7 @@ include = ["LICENSE"] "Bug Reports" = "https://github.com/kaizendorks/pymongo_inmemory/issues" [tool.poetry.dependencies] -python = "^3.6" +python = "^3.7" pymongo = "*" [tool.poetry.dev-dependencies]