Fix Shell on Python 3 #176
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Tests | |
on: [push, pull_request] | |
jobs: | |
test_som: | |
runs-on: ubuntu-20.04 # ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- name: AST Interpreter PyPy2 | |
id: ast | |
interp: AST | |
python-version: pypy2.7 | |
- name: Bytecode Interpreter PyPy2 | |
id: bc | |
interp: BC | |
python-version: pypy2.7 | |
- name: Basics PyPy 2.7 | |
python-version: pypy2.7 | |
id: basic | |
- name: Basics Python 3.11 | |
python-version: 3.11 | |
id: basic | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
submodules: true | |
- name: Set up PyPy | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Download PyPy Sources | |
if: matrix.id != 'basic' | |
run: | | |
export PYPYVER=v7.3.11 | |
curl https://downloads.python.org/pypy/pypy2.7-${PYPYVER}-src.tar.bz2 -o pypy.tar.bz2 | |
tar -xjf pypy.tar.bz2 | |
mv pypy2.7-${PYPYVER}-src .pypy | |
- name: Install PyTest | |
run: | | |
pip install pytest | |
- name: Tests | |
if: matrix.id == 'basic' | |
run: | | |
export PYTHON=python | |
export PYTHONPATH=src | |
SOM_INTERP=AST pytest | |
SOM_INTERP=BC pytest | |
SOM_INTERP=AST ./som.sh -cp Smalltalk TestSuite/TestHarness.som | |
SOM_INTERP=BC ./som.sh -cp Smalltalk TestSuite/TestHarness.som | |
echo "[system exit: 0] value" | SOM_INTERP=AST ./som.sh -cp Smalltalk | |
echo "[system exit: 0] value" | SOM_INTERP=BC ./som.sh -cp Smalltalk | |
- name: Full Tests | |
if: matrix.id != 'basic' | |
run: | | |
export SOM_INTERP=${{ matrix.interp }} | |
PYTHONPATH=$PYTHONPATH:.pypy:src pytest | |
PYTHONPATH=$PYTHONPATH:.pypy ./som.sh -cp Smalltalk TestSuite/TestHarness.som | |
PYTHONPATH=$PYTHONPATH:.pypy .pypy/rpython/bin/rpython --batch src/main_rpython.py | |
./som-${{ matrix.id }}-interp -cp Smalltalk TestSuite/TestHarness.som | |
- name: SomSom Tests | |
if: matrix.id != 'basic' | |
run: | | |
./som-${{ matrix.id }}-interp -cp core-lib/Smalltalk:core-lib/TestSuite:core-lib/SomSom/src/compiler:core-lib/SomSom/src/vm:core-lib/SomSom/src/vmobjects:core-lib/SomSom/src/interpreter:core-lib/SomSom/src/primitives \ | |
core-lib/SomSom/tests/SomSomTests.som | |
- name: Install and Run Black | |
run: | | |
pip install black | |
black --check --diff src tests | |
if: matrix.python-version == '3.11' | |
- name: Install and Run PyLint | |
run: | | |
pip install pylint | |
pylint --init-hook="import sys; sys.setrecursionlimit(2000)" src tests | |
if: matrix.python-version == '3.11' | |
concurrency: | |
group: "workflow = ${{ github.workflow }}, ref = ${{ github.event.ref }}, pr = ${{ github.event.pull_request.id }}" | |
cancel-in-progress: ${{ github.event_name == 'pull_request' }} |