From b7a08c42704fb880148b544ae3e6ec4d0ae61148 Mon Sep 17 00:00:00 2001 From: Chris Rink Date: Wed, 18 Sep 2024 10:49:59 -0400 Subject: [PATCH 1/3] Run tests on GraalPy 24.1.0 --- .github/workflows/run-tests.yml | 50 +++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index c0404b243..e15f9b91a 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -80,6 +80,56 @@ jobs: include-hidden-files: true if-no-files-found: error + run-graalpy-tests: + runs-on: ${{matrix.os}} + strategy: + matrix: + os: [ubuntu-latest] + version: ['3.11'] + include: + - version: '3.11' + graalpy-version: '24.1.0' + tox-env: py311 + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: graalpy-${{ matrix.graalpy-version }} + - name: Cache dependencies + id: cache-deps + uses: actions/cache@v4 + with: + path: | + .tox + ~/.cache/pip + ~/.cache/pypoetry + ~/.local/bin/poetry + ~/.local/share/pypoetry + key: ${{ runner.os }}-graalpy-${{ matrix.version }}-poetry-${{ hashFiles('.github/workflows/run-tests.yml', 'pyproject.toml', 'tox.ini') }} + - name: Install Poetry + if: steps.cache-deps.outputs.cache-hit != 'true' + run: curl -sSL https://install.python-poetry.org | python3 - + - name: Install Tox + run: | + pip install -U pip + pip install tox + - name: Run tests + env: + TOX_PARALLEL_NO_SPINNER: 1 + TOX_SHOW_OUTPUT: "True" + TOXENV: ${{ matrix.tox-env }} + run: | + tox run -- -n 2 + mkdir coverage + mv .coverage.* "coverage/.coverage.pypy${{ matrix.version }}" + - name: Archive code coverage results + uses: actions/upload-artifact@v4 + with: + name: code-coverage.graalpy${{ matrix.version }} + path: coverage/.coverage.py* + include-hidden-files: true + if-no-files-found: error + run-pypy-tests: runs-on: ${{matrix.os}} strategy: From ab7bc9b570973f86321941f6ccd1dfbd91102f9a Mon Sep 17 00:00:00 2001 From: Chris Rink Date: Wed, 18 Sep 2024 11:24:03 -0400 Subject: [PATCH 2/3] Simplify --- .github/workflows/run-tests.yml | 31 ++++++------------------------- 1 file changed, 6 insertions(+), 25 deletions(-) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index e15f9b91a..f6036fc91 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -80,6 +80,8 @@ jobs: include-hidden-files: true if-no-files-found: error + # Neither Tox nor Poetry have any real support for GraalPy right now, so we're + # just installing using GraalPy's pip and running PyTest manually in the runner. run-graalpy-tests: runs-on: ${{matrix.os}} strategy: @@ -89,7 +91,6 @@ jobs: include: - version: '3.11' graalpy-version: '24.1.0' - tox-env: py311 steps: - uses: actions/checkout@v4 - uses: actions/setup-python@v5 @@ -100,35 +101,15 @@ jobs: uses: actions/cache@v4 with: path: | - .tox ~/.cache/pip - ~/.cache/pypoetry - ~/.local/bin/poetry - ~/.local/share/pypoetry - key: ${{ runner.os }}-graalpy-${{ matrix.version }}-poetry-${{ hashFiles('.github/workflows/run-tests.yml', 'pyproject.toml', 'tox.ini') }} - - name: Install Poetry - if: steps.cache-deps.outputs.cache-hit != 'true' - run: curl -sSL https://install.python-poetry.org | python3 - - - name: Install Tox + key: ${{ runner.os }}-graalpy-${{ matrix.version }}-pip-${{ hashFiles('.github/workflows/run-tests.yml', 'pyproject.toml', 'tox.ini') }} + - name: Install Basilisp run: | pip install -U pip - pip install tox + pip install "pytest>=7.0.0,<9.0.0" "pygments" - name: Run tests - env: - TOX_PARALLEL_NO_SPINNER: 1 - TOX_SHOW_OUTPUT: "True" - TOXENV: ${{ matrix.tox-env }} run: | - tox run -- -n 2 - mkdir coverage - mv .coverage.* "coverage/.coverage.pypy${{ matrix.version }}" - - name: Archive code coverage results - uses: actions/upload-artifact@v4 - with: - name: code-coverage.graalpy${{ matrix.version }} - path: coverage/.coverage.py* - include-hidden-files: true - if-no-files-found: error + pytest --import-mode=importlib run-pypy-tests: runs-on: ${{matrix.os}} From bc0e54101563b9599647f53cdb4860ab8b5976ad Mon Sep 17 00:00:00 2001 From: Chris Rink Date: Wed, 18 Sep 2024 11:25:52 -0400 Subject: [PATCH 3/3] Ok --- .github/workflows/run-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index f6036fc91..a06668145 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -106,7 +106,7 @@ jobs: - name: Install Basilisp run: | pip install -U pip - pip install "pytest>=7.0.0,<9.0.0" "pygments" + pip install . "pytest>=7.0.0,<9.0.0" "pygments" - name: Run tests run: | pytest --import-mode=importlib