Skip to content

Commit

Permalink
Merge branch 'safe-global:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
lorks authored Feb 5, 2024
2 parents ac3b46f + 265d739 commit 861b08d
Show file tree
Hide file tree
Showing 11 changed files with 38 additions and 14 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: actions/cache@v3
- uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements-dev.txt') }}
Expand All @@ -43,7 +43,7 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: actions/cache@v3
- uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements-dev.txt') }}
Expand All @@ -68,7 +68,7 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: actions/cache@v3
- uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements-dev.txt') }}
Expand Down Expand Up @@ -111,7 +111,7 @@ jobs:
steps:
- name: Check out repository code
uses: actions/checkout@v4
- uses: actions/cache@v3
- uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements-dev.txt') }}
Expand Down Expand Up @@ -152,7 +152,7 @@ jobs:
- name: Set up Docker Buildx
uses: docker/[email protected]
- name: Cache Docker layers
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
Expand Down Expand Up @@ -197,7 +197,7 @@ jobs:
- name: Set up Docker Buildx
uses: docker/[email protected]
- name: Cache Docker layers
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
Expand Down
6 changes: 3 additions & 3 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
-r requirements.txt
black==23.12.1
coverage==7.4.0
coverage==7.4.1
factory-boy==3.3.0
Faker==22.2.0
Faker==22.5.1
flake8==7.0.0
isort==5.13.2
pre-commit==3.6.0
Expand All @@ -13,4 +13,4 @@ responses==0.24.1
mypy==1.8.0
django-stubs==4.2.7
djangorestframework-stubs==3.14.2
types-requests==2.31.0.20240106
types-requests==2.31.0.20240125
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
boto3==1.34.19
boto3==1.34.29
Django==5.0.1
django-cors-headers==4.3.1
djangorestframework==3.14.0
Expand Down
6 changes: 3 additions & 3 deletions src/about/tests/test_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ def test_json_payload_format(self):
url = reverse("v1:about:detail")
expected_json_response = {
"name": "Safe Config Service",
"version": "2.66.0",
"version": "2.69.0",
"apiVersion": "v1",
"secure": False,
}
Expand All @@ -24,7 +24,7 @@ def test_https_request(self):
url = reverse("v1:about:detail")
expected_json_response = {
"name": "Safe Config Service",
"version": "2.66.0",
"version": "2.69.0",
"api_version": "v1",
"secure": True,
}
Expand All @@ -38,7 +38,7 @@ def test_http_request(self):
url = reverse("v1:about:detail")
expected_json_response = {
"name": "Safe Config Service",
"version": "2.66.0",
"version": "2.69.0",
"api_version": "v1",
"secure": False,
}
Expand Down
17 changes: 17 additions & 0 deletions src/chains/migrations/0039_chain_is_testnet.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Generated by Django 5.0.1 on 2024-01-29 15:22

from django.db import migrations, models


class Migration(migrations.Migration):
dependencies = [
("chains", "0038_gasprice_max_fee_per_gas_and_more"),
]

operations = [
migrations.AddField(
model_name="chain",
name="is_testnet",
field=models.BooleanField(default=False),
),
]
1 change: 1 addition & 0 deletions src/chains/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ class RpcAuthentication(models.TextChoices):
)
description = models.CharField(max_length=255, blank=True)
l2 = models.BooleanField()
is_testnet = models.BooleanField(default=False)
rpc_authentication = models.CharField(
max_length=255, choices=RpcAuthentication.choices
)
Expand Down
1 change: 1 addition & 0 deletions src/chains/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ class Meta:
"short_name",
"description",
"l2",
"is_testnet",
"rpc_uri",
"safe_apps_rpc_uri",
"public_rpc_uri",
Expand Down
1 change: 1 addition & 0 deletions src/chains/tests/factories.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ class Meta:
short_name = factory.Faker("pystr", max_chars=255)
description = factory.Faker("pystr", max_chars=255)
l2 = factory.Faker("pybool")
is_testnet = factory.Faker("pybool")
rpc_authentication = factory.lazy_attribute(
lambda o: random.choice(list(Chain.RpcAuthentication))
)
Expand Down
2 changes: 2 additions & 0 deletions src/chains/tests/test_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ def test_json_payload_format(self) -> None:
"shortName": chain.short_name,
"description": chain.description,
"l2": chain.l2,
"isTestnet": chain.is_testnet,
"rpcUri": {
"authentication": chain.rpc_authentication,
"value": chain.rpc_uri,
Expand Down Expand Up @@ -156,6 +157,7 @@ def test_json_payload_format(self) -> None:
"shortName": chain.short_name,
"description": chain.description,
"l2": chain.l2,
"isTestnet": chain.is_testnet,
"rpcUri": {
"authentication": chain.rpc_authentication,
"value": chain.rpc_uri,
Expand Down
2 changes: 2 additions & 0 deletions src/safe_apps/tests/test_signals.py
Original file line number Diff line number Diff line change
Expand Up @@ -522,6 +522,8 @@ def test_on_feature_delete_with_safe_app(self) -> None:
"utf-8"
)

# Otherwise fails when testing with all suites - above tests somehow leak
@responses.stop # type: ignore
@responses.activate
def test_on_feature_update_with_multiple_safe_apps(self) -> None:
chain_id_1 = fake.pyint()
Expand Down
2 changes: 1 addition & 1 deletion src/version.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
__name__ = "Safe Config Service"
__version__ = "2.66.0"
__version__ = "2.69.0"

0 comments on commit 861b08d

Please sign in to comment.