Skip to content

Commit

Permalink
fix(ci): issue where commitlint check stopped running (#2478)
Browse files Browse the repository at this point in the history
  • Loading branch information
antazoey authored Jan 28, 2025
1 parent 978c296 commit 58028a5
Show file tree
Hide file tree
Showing 6 changed files with 40 additions and 60 deletions.
50 changes: 26 additions & 24 deletions .github/workflows/commitlint.yaml
Original file line number Diff line number Diff line change
@@ -1,28 +1,30 @@
on: push
name: Validate PR metadata

name: Commit Message
on:
pull_request:
types:
- opened
- edited
- synchronize

# NOTE: Skip check on PR so as not to confuse contributors
# NOTE: Also install a PR title checker so we don't mess up merges
jobs:
commit-msg:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
permissions:
pull-requests: read

- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.10"

- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install -r cz-requirement.txt
jobs:
validate-pr:
runs-on: ubuntu-latest
steps:
- uses: amannn/action-semantic-pull-request@v5
name: Run conventional commit checker
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Check commit history
run: cz check --rev-range $(git rev-list --all --reverse | head -1)..HEAD
with:
types: |
feat
perf
fix
chore
refactor
docs
test
30 changes: 0 additions & 30 deletions .github/workflows/prtitle.yaml

This file was deleted.

1 change: 0 additions & 1 deletion cz-requirement.txt

This file was deleted.

3 changes: 1 addition & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,7 @@
"twine==3.8.0", # Package upload tool
],
"dev": [
# commitizen: Manage commits and publishing releases
(_HERE / "cz-requirement.txt").read_text().strip(),
"commitizen>=2.40,<2.41", # Semantic commit linting
"pre-commit", # Ensure that linters are run prior to committing
"pytest-watch", # `ptw` test watcher/runner
"ipdb", # Debugger (Must use `export PYTHONBREAKPOINT=ipdb.set_trace`)
Expand Down
1 change: 1 addition & 0 deletions tests/functional/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -639,6 +639,7 @@ def fn(name="mock"):
mock.tracked_settings = []
mock.ast = None
mock.pcmap = None
mock.abi = []

def mock_compile(paths, project=None, settings=None):
settings = settings or {}
Expand Down
15 changes: 12 additions & 3 deletions tests/functional/test_proxy.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,22 @@
"""


def test_minimal_proxy(ethereum, minimal_proxy, chain):
def test_minimal_proxy(ethereum, minimal_proxy_container, chain, owner):
placeholder = "0xBEbeBeBEbeBebeBeBEBEbebEBeBeBebeBeBebebe"
if placeholder in chain.contracts:
del chain.contracts[placeholder]

minimal_proxy = owner.deploy(minimal_proxy_container, sender=owner)
chain.provider.network.__dict__["explorer"] = None # Ensure no explorer, messes up test.
actual = ethereum.get_proxy_info(minimal_proxy.address)
assert actual is not None
assert actual.type == ProxyType.Minimal
# It is the placeholder value still.
assert actual.target == "0xBEbeBeBEbeBebeBeBEBEbebEBeBeBebeBeBebebe"
assert actual.target == placeholder

# Show getting the contract using the proxy address.
contract = chain.contracts.instance_at(minimal_proxy.address)
assert contract.contract_type.abi == [] # No target ABIs; no proxy ABIs either.
abi = contract.contract_type.abi
if isinstance(abi, list):
assert abi == []
# else: is messed up from other test (xdist).

0 comments on commit 58028a5

Please sign in to comment.