File tree Expand file tree Collapse file tree 2 files changed +28
-3
lines changed Expand file tree Collapse file tree 2 files changed +28
-3
lines changed Original file line number Diff line number Diff line change @@ -50,12 +50,29 @@ jobs:
5050 uses : actions/setup-python@v4
5151 with :
5252 python-version : ${{ matrix.python-version }}
53+ - if : ${{ runner.os == 'Windows' }}
54+ # This is needed so that restoring cache on Windows is fast.
55+ # See until https://github.com/actions/cache/issues/752 is resolved.
56+ name : Use GNU tar
57+ shell : cmd
58+ run : |
59+ echo "Adding GNU tar to PATH"
60+ echo C:\Program Files\Git\usr\bin>>"%GITHUB_PATH%"
5361 - uses : actions/cache@v3
5462 with :
55- path : ~/.cache/pip
56- key : ${{ runner.os }}-pip-${{ matrix.python-version }}-${{ hashFiles('Pipfile.lock ') }}
63+ path : ${{ env.pythonLocation }}
64+ key : ${{ runner.os }}-pip-${{ env.pythonLocation }}-${{ hashFiles('setup.py ') }}
5765 - name : Install dependencies
58- run : pip install wheel && pip install .[dev]
66+ # Only if the cache misses
67+ # Based on https://github.com/pypa/pip/issues/8049#issuecomment-633845028
68+ # read_requirements.py should be removed once
69+ # https://github.com/pypa/pip/issues/11440 is resolved.
70+ if : steps.cache.outputs.cache-hit != "true"
71+ run : |
72+ pip install toml
73+ python tests/read_requirements.py | pip install -r /dev/stdin
74+ - name : Install Mesa
75+ run : pip install --no-deps .
5976 - name : Test with pytest
6077 run : pytest --cov=mesa tests/ --cov-report=xml
6178 - if : matrix.os == 'ubuntu'
Original file line number Diff line number Diff line change 1+ import toml
2+
3+ # This file reads the pyproject.toml and prints out the
4+ # dependencies and dev dependencies.
5+ # It is located in tests/ folder so as not to pollute the root repo.
6+ c = toml .load ("pyproject.toml" )
7+ print ("\n " .join (c ["project" ]["dependencies" ]))
8+ print ("\n " .join (c ["project" ]["optional-dependencies" ]["dev" ]))
You can’t perform that action at this time.
0 commit comments