-
Notifications
You must be signed in to change notification settings - Fork 0
37 lines (33 loc) · 962 Bytes
/
Copy pathtest-python.yml
File metadata and controls
37 lines (33 loc) · 962 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
name: Python
on:
pull_request:
paths:
- '.github/workflows/test-python.yml'
- 'python/src/**'
- 'python/pyproject.toml'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
name: Build
timeout-minutes: 5
defaults:
run:
working-directory: python
permissions:
contents: read
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
persist-credentials: false
- uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5
with:
python-version-file: 'python/pyproject.toml'
cache: pip
- run: pip install ".[dev]"
- run: find src -name '*.py' -exec python -m py_compile {} +
- run: python -m pytest tests/test_optimal_portfolio_scenario.py