Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(ci): add python build matrix #11

Merged
merged 3 commits into from
Nov 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,17 @@ on:

jobs:
build:
strategy:
matrix:
os: [ubuntu-20.04]
python-version: [3.7, 3.8, 3.9, 3.10.6, 3.11]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Setup Packages
run: sh tools/setup.sh
- name: Build Packages
Expand Down
2 changes: 1 addition & 1 deletion mathy_core/problems.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
@dataclass
class MathyTermTemplate:
variable: Optional[str] = None # the term variable
exponent: Optional[int | float] = None # the term exponent
exponent: Optional[Union[int, float]] = None # the term exponent

def make(self) -> str:
return mathy_term_string(
Expand Down
2 changes: 2 additions & 0 deletions tools/setup.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#!/bin/bash
set -e

python3 --version

# Make the virtualenv only if the folder doesn't exist
DIR=.env
if [ ! -d "${DIR}" ]; then
Expand Down