Skip to content

Commit

Permalink
Ertugrul/update actions (#66)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
ekarademir authored May 23, 2023
1 parent 7dbf7df commit 4f6cdba
Show file tree
Hide file tree
Showing 5 changed files with 54 additions and 58 deletions.
51 changes: 24 additions & 27 deletions .github/workflows/pypi-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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/[email protected]
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 }}
38 changes: 18 additions & 20 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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/[email protected]
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
2 changes: 1 addition & 1 deletion .python-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.6.10
3.7.16
15 changes: 8 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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`.
Expand Down Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -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 <[email protected]>"]
maintainers = [
Expand All @@ -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",
Expand All @@ -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]
Expand Down

0 comments on commit 4f6cdba

Please sign in to comment.