Skip to content

Commit cd602a5

Browse files
authored
Run PyPy tests on Github Actions (#971)
1 parent caf1bfc commit cd602a5

File tree

3 files changed

+53
-74
lines changed

3 files changed

+53
-74
lines changed

.circleci/config.yml

Lines changed: 0 additions & 73 deletions
This file was deleted.

.github/workflows/run-tests.yml

Lines changed: 52 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,55 @@ jobs:
7878
name: code-coverage
7979
path: coverage/.coverage.py*
8080

81+
run-pypy-tests:
82+
runs-on: ${{matrix.os}}
83+
strategy:
84+
matrix:
85+
os: [ubuntu-latest]
86+
version: ['3.9', '3.10']
87+
include:
88+
- version: '3.9'
89+
tox-env: pypy39
90+
- version: '3.10'
91+
tox-env: pypy310
92+
steps:
93+
- uses: actions/checkout@v3
94+
- uses: actions/setup-python@v4
95+
with:
96+
python-version: pypy${{ matrix.version }}
97+
- name: Cache dependencies
98+
id: cache-deps
99+
uses: actions/cache@v3
100+
with:
101+
path: |
102+
.tox
103+
~/.cache/pip
104+
~/.cache/pypoetry
105+
~/.local/bin/poetry
106+
~/.local/share/pypoetry
107+
key: ${{ runner.os }}-pypy-${{ matrix.version }}-poetry-${{ hashFiles('.github/workflows/run-tests.yml', 'pyproject.toml', 'tox.ini') }}
108+
- name: Install Poetry
109+
if: steps.cache-deps.outputs.cache-hit != 'true'
110+
run: curl -sSL https://install.python-poetry.org | python3 -
111+
- name: Install Tox
112+
run: |
113+
pip install -U pip
114+
pip install tox
115+
- name: Run tests
116+
env:
117+
TOX_PARALLEL_NO_SPINNER: 1
118+
TOX_SHOW_OUTPUT: "True"
119+
TOXENV: ${{ matrix.tox-env }}
120+
run: |
121+
tox run -- -n 2
122+
mkdir coverage
123+
mv .coverage.* "coverage/.coverage.py${{ matrix.version }}"
124+
- name: Archive code coverage results
125+
uses: actions/upload-artifact@v3
126+
with:
127+
name: code-coverage
128+
path: coverage/.coverage.py*
129+
81130
min-deps-test:
82131
# Attempt to run the TOX-ENV tests for the given OS and python
83132
# VERSION with the minimal possible Basilisp dependencies
@@ -136,7 +185,9 @@ jobs:
136185
137186
report-coverage:
138187
runs-on: ubuntu-latest
139-
needs: run-tests
188+
needs:
189+
- run-tests
190+
- run-pypy-tests
140191
steps:
141192
- uses: actions/checkout@v3
142193
- uses: actions/setup-python@v4

tox.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ setenv =
1111
deps =
1212
coverage[toml]
1313
pytest >=7.0.0,<8.0.0
14+
pytest-xdist >=3.6.1,<4.0.0
1415
pygments
1516
commands =
1617
coverage run \

0 commit comments

Comments
 (0)