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

chore[test]: windows test pipeline #4023

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 33 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -194,16 +194,47 @@ jobs:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage.xml

windows:
runs-on: windows-latest
strategy:
matrix:
python-version: [["3.12", "312"]]
evm-version: [shanghai]
evm-backend: [py-evm]

name: "py${{ matrix.python-version[1] }}-windows-${{ matrix.evm-version }}-${{ matrix.evm-backend }}"

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # we need the full history for setuptools_scm to infer the version

- name: Set up Python ${{ matrix.python-version[0] }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version[0] }}
cache: "pip"

- name: Install dependencies
run: pip install .[test]

- name: Run tests
run: >
pytest
-m "not fuzzing"
--evm-version ${{ matrix.evm-version }}
--evm-backend ${{ matrix.evm-backend }}
tests/

core-tests-success:
if: always()
# summary result from test matrix.
# see https://github.community/t/status-check-for-a-matrix-jobs/127354/7
runs-on: ubuntu-latest
needs: tests
needs: [tests, windows]
steps:
- name: Check tests tests all succeeded
if: ${{ needs.tests.result != 'success' }}
if: ${{ needs.tests.result != 'success' || needs.windows.result != 'success' }}
run: exit 1


Expand Down
2 changes: 1 addition & 1 deletion tests/unit/cli/vyper_compile/test_compile_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -424,4 +424,4 @@ def test_archive_search_path(tmp_path_factory, make_file, chdir_tmp_path):
output_bundle = OutputBundle(compiler_data)

used_dir = search_paths[-1].stem # either dir1 or dir2
assert output_bundle.used_search_paths == [".", "0/" + used_dir]
assert output_bundle.used_search_paths == [".", str(Path("0", used_dir))]
4 changes: 2 additions & 2 deletions vyper/cli/vyper_json.py
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ def get_output_formats(input_dict: dict) -> dict[PurePath, list[str]]:
output_paths = [PurePath(path) for path in input_dict["sources"].keys()]
else:
output_paths = [PurePath(path)]
if str(output_paths[0]) not in input_dict["sources"]:
if output_paths[0].as_posix() not in input_dict["sources"]:
raise JSONError(f"outputSelection references unknown contract '{output_paths[0]}'")

for output_path in output_paths:
Expand Down Expand Up @@ -317,7 +317,7 @@ def compile_from_input_dict(
def format_to_output_dict(compiler_data: dict) -> dict:
output_dict: dict = {"compiler": f"vyper-{vyper.__version__}", "contracts": {}, "sources": {}}
for path, data in compiler_data.items():
path = str(path) # Path breaks json serializability
path = path.as_posix()
output_dict["sources"][path] = {"id": data["source_id"]}

for k in ("ast_dict", "annotated_ast_dict"):
Expand Down
Loading