Skip to content

Commit

Permalink
1.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
filipsnastins authored Jan 20, 2024
1 parent 93282e1 commit 24abea2
Show file tree
Hide file tree
Showing 211 changed files with 7,411 additions and 2,692 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,9 @@ jobs:
run: |
poetry run python -c "import tomodachi_testcontainers"
poetry run python -c "import tomodachi_testcontainers.clients"
poetry run python -c "import tomodachi_testcontainers.pytest"
poetry run python -c "import tomodachi_testcontainers.fixtures"
poetry run python -c "import tomodachi_testcontainers.assertions"
poetry run python -c "import tomodachi_testcontainers.async_probes"
poetry run python -c "import tomodachi_testcontainers.utils"
- name: Install dependencies - dev and extas
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.12

- name: Set up Poetry cache for Python dependencies
uses: actions/cache@v3
if: startsWith(runner.os, 'Linux')
Expand Down
48 changes: 48 additions & 0 deletions .github/workflows/test-docs-src.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: test-docs-src

on:
push:
branches: [main]
pull_request:

jobs:
build:
runs-on: ubuntu-latest
env:
POETRY_VIRTUALENVS_CREATE: false
TESTCONTAINER_DOCKER_NETWORK: tomodachi-testcontainers
DOCKER_BUILDKIT: 1
steps:
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.12

- name: Set up Poetry cache for Python dependencies
uses: actions/cache@v3
if: startsWith(runner.os, 'Linux')
with:
path: ~/.cache/pypoetry
key: ${{ runner.os }}-poetry-${{ hashFiles('**/poetry.lock') }}
restore-keys: ${{ runner.os }}-poetry-

- name: Install Poetry
run: |
curl -sSL https://install.python-poetry.org | POETRY_HOME="$HOME/.poetry" python - --yes
echo "$HOME/.poetry/bin" >> $GITHUB_PATH
- name: Test Poetry installation
run: poetry --version

- name: Install dependencies
run: |
poetry install --no-interaction --all-extras --with dev
poetry show --tree
- name: Create Docker network for running Testcontianers
run: docker network create ${{ env.TESTCONTAINER_DOCKER_NETWORK }}

- name: Run docs_src/ tests
run: poetry run test-docs-src
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -142,3 +142,6 @@ secrets/
# VSCode
.vscode/*
!.vscode/*.example.json

# Node
node_modules/
5 changes: 5 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ repos:
rev: v2.12.0
hooks:
- id: hadolint-docker
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v3.1.0
hooks:
- id: prettier
types: [markdown]
- repo: local
hooks:
- id: format
Expand Down
4 changes: 3 additions & 1 deletion .pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,9 @@ disable=arguments-differ,
too-many-arguments,
too-many-instance-attributes,
unspecified-encoding,
unused-argument
unused-argument,
wrong-import-order,
wrong-import-position

# Enable the message, report, category or checker with the given id(s). You can
# either give multiple identifier separated by comma (,) or put this option
Expand Down
1 change: 1 addition & 0 deletions .vscode/settings.example.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"python.testing.pytestEnabled": true,
"black-formatter.args": ["--config", "${workspaceFolder}/pyproject.toml"],
"[python]": {
"editor.defaultFormatter": "ms-python.black-formatter"
},
Expand Down
37 changes: 37 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,42 @@
# Changelog

## 1.0.0 (2024-01-20) 🎉

### New features

- New documentation available at <https://filipsnastins.github.io/tomodachi-testcontainers/>

- `WireMockContainer`: adds `wiremock_container` pytest fixture.

- `WireMockContainer`: adds `reset_wiremock_container_on_teardown` pytest fixture that deletes all WireMock stub mappings after each test.

- `edge_port` in all Testcontainers now defaults to `None`.
When it's `None`, the container will be started with a random port generated by `tomodachi_testcontainers.utils.get_available_port()`.

- `tomodachi_testcontainers.pytest` module removed, and the code moved one level up:

- `tomodachi_testcontainers.fixtures`
- `tomodachi_testcontainers.assertions`
- `tomodachi_testcontainers.async_probes`

### Breaking changes

- Removed the leading underscore from `restart_localstack_container_on_teardown` and `reset_moto_container_on_teardown` pytest fixture names.

- Fixtures `moto_snssqs_tc` and `localstack_snssqs_tc` are now session-scoped (`@pytest.fixture(scope="session")`).

- Fixture `testcontainers_docker_image` renamed to `testcontainer_image`.

- Renamed environment variables:

| Old name | New name |
| :--------------------------------------------- | :----------------------------------- |
| `TOMODACHI_TESTCONTAINER_DOCKER_NETWORK` | `TESTCONTAINER_DOCKER_NETWORK` |
| `TOMODACHI_TESTCONTAINER_DOCKERFILE_PATH` | `TESTCONTAINER_DOCKERFILE_PATH` |
| `TOMODACHI_TESTCONTAINER_DOCKER_BUILD_CONTEXT` | `TESTCONTAINER_DOCKER_BUILD_CONTEXT` |
| `TOMODACHI_TESTCONTAINER_DOCKER_BUILD_TARGET` | `TESTCONTAINER_DOCKER_BUILD_TARGET` |
| `TOMODACHI_TESTCONTAINER_IMAGE_ID` | `TESTCONTAINER_IMAGE_ID` |

## 0.14.0 (2024-01-18)

### New features
Expand Down
Loading

0 comments on commit 24abea2

Please sign in to comment.