Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix workflows #330

Merged
merged 12 commits into from
Jul 26, 2024
76 changes: 0 additions & 76 deletions .github/workflows/codeql.yml

This file was deleted.

2 changes: 0 additions & 2 deletions .github/workflows/test-external.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ name: Test external projects
on:
push:
branches: [main, chore-workflows]
paths:
- .github/workflows/test-external.yml
workflow_dispatch:
inputs:
halmos-options:
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/test-ffi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ name: Test FFI
on:
push:
branches: [main, chore-workflows]
paths:
- .github/workflows/test-ffi.yml
pull_request:
branches: [main]
workflow_dispatch:
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/test-long.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ name: Test long
on:
push:
branches: [main, chore-workflows]
paths:
- .github/workflows/test-long.yml
workflow_dispatch:
inputs:
halmos-options:
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ name: Test
on:
push:
branches: [main, chore-workflows]
paths:
- .github/workflows/test.yml
pull_request:
branches: [main]
workflow_dispatch:
Expand All @@ -28,7 +26,7 @@ jobs:
fail-fast: false
matrix:
os: ["macos-latest", "ubuntu-latest", "windows-latest"]
python-version: ["3.9", "3.10", "3.11", "3.12"]
python-version: ["3.11", "3.12"]
parallel: ["", "--test-parallel"]
storage-layout: ["solidity", "generic"]

Expand Down
6 changes: 6 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,18 +1,24 @@
[submodule "tests/lib/forge-std"]
path = tests/lib/forge-std
url = https://github.com/foundry-rs/forge-std
shallow = true
[submodule "tests/lib/halmos-cheatcodes"]
path = tests/lib/halmos-cheatcodes
url = https://github.com/a16z/halmos-cheatcodes
shallow = true
[submodule "tests/lib/openzeppelin-contracts"]
path = tests/lib/openzeppelin-contracts
url = https://github.com/OpenZeppelin/openzeppelin-contracts
shallow = true
[submodule "tests/lib/solmate"]
path = tests/lib/solmate
url = https://github.com/transmissions11/solmate
shallow = true
[submodule "tests/lib/solady"]
path = tests/lib/solady
url = https://github.com/Vectorized/solady
shallow = true
[submodule "tests/lib/multicaller"]
path = tests/lib/multicaller
url = https://github.com/Vectorized/multicaller
shallow = true
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what's the effect of this in the normal dev setting for cloning and updating submodules? is this better than having the ci script to use --depth 1 when cloning?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not clear, didn't seem to move metrics. It's also weirdly hard to test, because I can't check out this commit directly. I'm not convinced this does anything 😫

1 change: 0 additions & 1 deletion packages/halmos-builder/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,3 @@ COPY --from=ghcr.io/foundry-rs/foundry:latest \
ADD --chmod=755 https://astral.sh/uv/install.sh /install.sh
RUN /install.sh && rm /install.sh
ENV PATH="/root/.cargo/bin:${PATH}"

5 changes: 1 addition & 4 deletions packages/halmos/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
# FROM ghcr.io/a16z/halmos-builder:latest

# TODO: switch to :latest as soon as the image is available
FROM ghcr.io/a16z/halmos-builder:chore-workflows
FROM ghcr.io/a16z/halmos-builder:latest

Check failure on line 1 in packages/halmos/Dockerfile

View check run for this annotation

Wiz - a16z / Wiz IaC Scanner

Missing User Instruction

Rule ID: 20e53ab0-a30c-4d4a-8659-9301915cf0a8 Severity: High Resource: FROM={{ghcr.io/a16z/halmos-builder:latest}} A user should be specified in the dockerfile, otherwise the image will run as root
Raw output
Expected: The 'Dockerfile' should contain the 'USER' instruction
Found: The 'Dockerfile' does not contain any 'USER' instruction

Check warning on line 1 in packages/halmos/Dockerfile

View check run for this annotation

Wiz - a16z / Wiz IaC Scanner

Image Version Using 'latest'

Rule ID: 9c0f375a-6b4e-486f-864d-86fe2eb86ba1 Severity: Medium Resource: FROM={{ghcr.io/a16z/halmos-builder:latest}} When building images, always tag them with useful tags which codify version information, intended destination (prod or test, for instance), stability, or other information that is useful when deploying the application in different environments. Do not rely on the automatically-created latest tag
Raw output
Expected: FROM ghcr.io/a16z/halmos-builder:latest:'version' where version should not be 'latest'
Found: FROM ghcr.io/a16z/halmos-builder:latest'

Check notice on line 1 in packages/halmos/Dockerfile

View check run for this annotation

Wiz - a16z / Wiz IaC Scanner

Healthcheck Instruction Missing

Rule ID: 4c178636-6538-4ebe-ae23-1fb3e59fc9dd Severity: Low Resource: FROM={{ghcr.io/a16z/halmos-builder:latest}} Ensure that HEALTHCHECK is being used. The HEALTHCHECK instruction tells Docker how to test a container to check that it is still working
Raw output
Expected: Dockerfile should contain instruction 'HEALTHCHECK'
Found: Dockerfile doesn't contain instruction 'HEALTHCHECK'

# Enable the virtual environment
ENV PATH="/halmos/.venv/bin:$PATH"
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ classifiers = [
"License :: OSI Approved :: GNU Affero General Public License v3",
"Operating System :: OS Independent",
]
requires-python = ">=3.9"
requires-python = ">=3.11"
dependencies = [
"sortedcontainers>=2.4.0",
"toml>=0.10.2",
Expand All @@ -35,7 +35,7 @@ halmos = "halmos.__main__:main"
"Homepage" = "https://github.com/a16z/halmos"

[tool.black]
target-version = ["py39", "py310", "py311", "py312"]
target-version = ["py311", "py312"]

[tool.pytest.ini_options]
# TODO: re-add test_traces.py when we have a better way to support it in CI
Expand Down