Allow the option to optimize during setup.py build #65
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: build | |
on: | |
push: | |
branches: | |
- master | |
- testing | |
- 1.0.x | |
- 1.1.x | |
- 1.2.x | |
- 1.3.x | |
pull_request: | |
branches: | |
- master | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-22.04, macos-latest] | |
python-version: [3.8, 3.9, "3.10", "3.11", "3.12", "pypy3.9"] | |
include: | |
- os: ubuntu-22.04 | |
python-version: "2.7" | |
- os: windows-latest | |
python-version: 3.9 | |
- os: windows-latest | |
python-version: "3.10" | |
- os: windows-latest | |
python-version: "3.11" | |
- os: windows-latest | |
python-version: "3.12" | |
exclude: | |
- os: macos-latest | |
python-version: 3.5 | |
- os: macos-latest | |
python-version: 3.6 | |
- os: macos-latest | |
python-version: "pypy3.9" | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python-version }} via setup-python | |
if: matrix.python-version != '2.7' | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Set up Python ${{ matrix.python-version }} via apt-get | |
if: matrix.python-version == '2.7' | |
run: | | |
set -eux | |
sudo apt-get update | |
sudo apt-get install -y python2 python3-virtualenv | |
virtualenv -p python2 "${{ runner.temp }}/venv" | |
echo "${{ runner.temp }}/venv/bin" >> $GITHUB_PATH | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
# must install all dependencies so the tab modules can be generated | |
python -m pip install coverage flake8 ply setuptools | |
python -m pip install -e . | |
- name: Lint with flake8 | |
run: | | |
flake8 | |
- name: Test with unittest | |
run: | | |
python -OO -m unittest calmjs.parse.tests.make_suite | |
coverage run --include=src/* -m unittest calmjs.parse.tests.make_suite | |
# Python 3.12 on Windows resulted in MemoryError here, so optional. | |
- name: Coverage report | |
run: | | |
coverage report -m | |
continue-on-error: true | |
- name: Coveralls | |
if: ${{ matrix.os == 'ubuntu-22.04' && matrix.python-version != '2.7' && matrix.python-version != 'pypy2' }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
python -m pip install coveralls | |
coveralls --service=github |