-
Notifications
You must be signed in to change notification settings - Fork 10
46 lines (35 loc) · 1.16 KB
/
python-test.yml
File metadata and controls
46 lines (35 loc) · 1.16 KB
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
38
39
40
41
42
43
44
45
46
name: Python Test
on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.9'
- name: Install dependencies
run: |
pip install -r requirements.txt
pip install pytest coverage
- name: Install MOSEK
run: |
pip install mosek
- name: Setup MOSEK license
env:
MOSEK_LICENSE_BASE64: ${{ secrets.MOSEK_LICENSE_BASE64 }}
run: |
mkdir -p /home/runner/mosek
echo "$MOSEK_LICENSE_BASE64" | base64 -d > /home/runner/mosek/mosek.lic
echo "MOSEK_LICENSE_PATH: /home/runner/mosek/mosek.lic"
ls -l /home/runner/mosek/mosek.lic
echo "MOSEKLM_LICENSE_FILE=/home/runner/mosek/mosek.lic" >> $GITHUB_ENV
echo "PATH=$PATH:/home/runner/mosek" >> $GITHUB_ENV
- name: Run tests
run: |
pytest --cov=dro tests/ --cov-report=xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}