diff --git a/.github/workflows/os-test.yml b/.github/workflows/os-test.yml new file mode 100644 index 0000000000..bac60ee5fe --- /dev/null +++ b/.github/workflows/os-test.yml @@ -0,0 +1,28 @@ +name: OS test + +on: + workflow_dispatch: + push: + +jobs: + build: + runs-on: ${{ matrix.os }} + + strategy: + matrix: + os: [ ubuntu-latest, macos-13, macos-14, windows-2022 ] + python-version: [ 3.11.9 ] + + steps: + + - uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + + - name: Install dependencies + run: | + python -m pip install --upgrade pip setuptools wheel + pip install -r requirements.txt diff --git a/.github/workflows/slow-test-master.yml b/.github/workflows/slow-test-master.yml deleted file mode 100644 index 32ba27e130..0000000000 --- a/.github/workflows/slow-test-master.yml +++ /dev/null @@ -1,37 +0,0 @@ -name: Slow test (master) - -on: - schedule: - - cron: '0 1 * * 0' - - workflow_dispatch: - -jobs: - build: - - runs-on: ubuntu-latest - - steps: - - - uses: actions/checkout@v4 - with: - ref: "master" - - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: '3.8' - - - name: Install dependencies - run: | - python -m pip install pip setuptools wheel - pip install pytest - pip install -r requirements.txt - - - name: Test with pytest - run: | - pytest --runslow --disable-warnings - - #- name: Coverage report - # run: | - # coverage html diff --git a/.github/workflows/slow-test-develop.yml b/.github/workflows/slow-test.yml similarity index 91% rename from .github/workflows/slow-test-develop.yml rename to .github/workflows/slow-test.yml index efafde9725..3b08c8225f 100644 --- a/.github/workflows/slow-test-develop.yml +++ b/.github/workflows/slow-test.yml @@ -1,4 +1,4 @@ -name: Slow test (develop) +name: Slow test on: schedule: @@ -17,8 +17,6 @@ jobs: steps: - uses: actions/checkout@v4 - with: - ref: "develop" - name: Set up Python uses: actions/setup-python@v5 diff --git a/requirements.txt b/requirements.txt index bf277a1bb0..44f76b9c94 100644 --- a/requirements.txt +++ b/requirements.txt @@ -5,7 +5,7 @@ numpy>=1.24.0 scipy>=1.0.0 pymongo==3.11.3 ib-insync==0.9.86 -psutil==5.6.6 +psutil==5.6.7 pytest>6.2 Flask>=2.0.1 Werkzeug>=2.0.1 diff --git a/setup.py b/setup.py index 16c5a58a3f..73aa922cb5 100755 --- a/setup.py +++ b/setup.py @@ -91,7 +91,7 @@ def dir_this_file(): "numpy>=1.24.0", "scipy>=1.0.0", "pymongo==3.11.3", - "psutil==5.6.6", + "psutil==5.6.7", "pytest>6.2", "Flask>=2.0.1", "Werkzeug>=2.0.1", diff --git a/tests/test_examples.py b/tests/test_examples.py index cef949fb9b..ea76a37cfa 100644 --- a/tests/test_examples.py +++ b/tests/test_examples.py @@ -236,6 +236,7 @@ def test_simple_system_portfolio_estimated( print(my_system.portfolio.get_instrument_weights().tail(5)) print(my_system.portfolio.get_instrument_diversification_multiplier().tail(5)) + @pytest.mark.slow # will be skipped unless run with 'pytest --runslow' def test_simple_system_portfolio_fixed( self, data, raw_data, my_rules, my_config, fcs, combiner, possizer, portfolio ): @@ -253,6 +254,7 @@ def test_simple_system_portfolio_fixed( print(my_system.portfolio.get_notional_position("SOFR").tail(5)) + @pytest.mark.slow # will be skipped unless run with 'pytest --runslow' def test_simple_system_costs( self, data, @@ -280,6 +282,7 @@ def test_simple_system_costs( print(profits.gross.percent.stats()) print(profits.net.percent.stats()) + @pytest.mark.slow # will be skipped unless run with 'pytest --runslow' def test_simple_system_config_object(self, data, ewmac_8, ewmac_32): my_config = Config( dict( @@ -357,6 +360,7 @@ def test_simple_system_risk_overlay(self, data, ewmac_8, ewmac_32): ) print(my_system.portfolio.get_notional_position("SOFR").tail(5)) + @pytest.mark.slow # will be skipped unless run with 'pytest --runslow' def test_simple_system_config_import(self, data): my_config = Config("systems.provided.example.simplesystemconfig.yaml") my_config.exclude_instrument_lists = dict(