Skip to content

Commit 04b194f

Browse files
authored
Run tests in gh actions, similar to fmu-sumo (#160)
* Run tests in gh actions, similar to fmu-sumo * Try without timeout * Add pip list
1 parent faf3acc commit 04b194f

1 file changed

Lines changed: 16 additions & 9 deletions

File tree

.github/workflows/pytest.yml

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,25 @@
1-
name: pytest
1+
name: Build and test Sumo wrapper
22

33
on:
44
pull_request:
55
branches: [ "main" ]
6+
schedule:
7+
- cron: "3 3 * * *"
68

79
workflow_dispatch:
810

911
jobs:
10-
pytest:
11-
runs-on: ubuntu-latest
12+
build_pywheels:
13+
name: PY ${{ matrix.python-version }} on ${{ matrix.os }}
14+
runs-on: ${{ matrix.os }}
1215
strategy:
1316
matrix:
14-
python-version: ["3.8", "3.9"]
17+
python-version: ["3.8", "3.9", "3.10", "3.11"]
18+
os: [ubuntu-latest, windows-latest, macos-latest]
1519
permissions:
1620
contents: read
1721
id-token: write
22+
1823
steps:
1924
- uses: actions/checkout@v3
2025

@@ -25,20 +30,22 @@ jobs:
2530
tenant-id: 3aa4a235-b6e2-48d5-9195-7fcf05b459b0
2631
subscription-id: 87897772-fb27-495f-ae40-486a2df57baa
2732

28-
- name: Set up Python ${{ matrix.python-version }}
33+
- name: Set up Python
2934
uses: actions/setup-python@v3
3035
with:
3136
python-version: ${{ matrix.python-version }}
3237

3338
- name: Install sumo-wrapper-python
3439
run: |
35-
python -m pip install --upgrade pip
36-
pip install .
40+
python -m pip install --upgrade pip &&
41+
python -m pip install .
42+
43+
python -m pip list
3744
3845
- name: Run pytest
46+
shell: bash
3947
run: |
4048
access_token=$(az account get-access-token --scope api://88d2b022-3539-4dda-9e66-853801334a86/.default --query accessToken --output tsv)
41-
echo ${#access_token}
4249
export ACCESS_TOKEN=$access_token
4350
pip install -r requirements/requirements_test.txt
44-
pytest -q -s -x --disable-warnings tests/test_sumo_thin_client.py
51+
pytest -s

0 commit comments

Comments
 (0)