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

CI for different python versions and different os #39

Merged
merged 7 commits into from
Oct 24, 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
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ on:
workflow_dispatch:

jobs:
build:
lint:
runs-on: ubuntu-latest

steps:
Expand Down
20 changes: 14 additions & 6 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,27 +4,35 @@ on:
push:
branches:
- main
- github-actions-test
pull_request:
branches:
- main
types:
- opened
- synchronize
workflow_run:
workflows: ["lint"]
types:
- completed
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest

test:
strategy:
matrix:
python: ["3.8", "3.9", "3.10"]
os: [ubuntu-latest, windows-latest, macos-latest]

name: Install and test package on ${{ matrix.os }} for Python ${{ matrix.python }}
runs-on: ${{ matrix.os }}
steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Setup Python
- name: Setup Python ${{ matrix.python }}
uses: actions/setup-python@v4
with:
python-version: 3.8
python-version: ${{ matrix.python }}

- name: Install package [pip]
run: |
Expand Down
2 changes: 1 addition & 1 deletion tests/models/test_knapsack.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def test_knapsack():
"status": "not optimized",
}

model.minimize(ballistic=True, verbose=False)
model.minimize(ballistic=True, verbose=False, agents=1000)
assert model.summary["items"] == [1, 2, 3, 4]
assert model.summary["total_cost"] == 15
assert model.summary["total_weight"] == 8
Expand Down