-
Notifications
You must be signed in to change notification settings - Fork 0
77 lines (68 loc) · 2.93 KB
/
usage.yml
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
name: Usage
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
workflow_dispatch:
jobs:
checkout_and_use:
# Only windows-2019 hosts have wsl enabled
runs-on: windows-2019
strategy:
matrix:
python-version: [3.8, 3.9, "3.10", 3.11]
fail-fast: false
timeout-minutes: 90
steps:
- uses: actions/checkout@v2
with:
path: repo
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Checkout GitHub action
uses: actions/checkout@v2
with:
repository: PowelAS/sme-run-mesh-service
ref: master
token: ${{ secrets.OAUTH_TOKEN }}
path: .github/actions
- name: Install and run Mesh server
uses: ./.github/actions/
id: download-mesh-server
with:
GITHUB_TOKEN: ${{ secrets.OAUTH_TOKEN }}
MESH_SERVICE_TAG: 'v2.11.0.13'
# run one example before installing pytest packages and pandas
# to check if all dependencies are installed together with Mesh Python SDK pip package
- name: Install and test Python SDK (Windows)
run: |
python -m pip install git+https://github.com/Volue-Public/energy-mesh-python@${{ github.ref }}
python ./repo/src/volue/mesh/examples/get_version.py
if ($LASTEXITCODE) { exit $LASTEXITCODE }
python -m pip install pytest pytest-asyncio==0.21.1 pandas
python -m pytest --pyargs volue.mesh.tests -m "not authentication and not long"
- name: Install Ubuntu 20.04 (wsl1)
uses: Vampire/setup-wsl@v1
with:
distribution: Ubuntu-20.04
set-as-default: 'true'
update: 'false'
# run one example before installing pytest packages and pandas
# to check if all dependencies are installed together with Mesh Python SDK pip package
- name: Install and test Python SDK (Ubuntu 20.04)
shell: wsl-bash {0}
run: |
sudo apt-get update
sudo apt-get install --yes software-properties-common
sudo add-apt-repository --yes ppa:deadsnakes/ppa
sudo apt-get install --yes python${{ matrix.python-version }}
sudo apt-get install --yes python${{ matrix.python-version }}-distutils
curl -sS https://bootstrap.pypa.io/get-pip.py | python${{ matrix.python-version }}
sudo apt-get install --yes libkrb5-dev gcc
sudo apt-get install --yes python${{ matrix.python-version }}-dev
python${{ matrix.python-version }} -m pip install git+https://github.com/Volue-Public/energy-mesh-python@${{ github.ref }}
python${{ matrix.python-version }} ./repo/src/volue/mesh/examples/get_version.py
python${{ matrix.python-version }} -m pip install pytest pytest-asyncio==0.21.1 pandas
python${{ matrix.python-version }} -m pytest --pyargs volue.mesh.tests -m "not authentication and not long"