-
Notifications
You must be signed in to change notification settings - Fork 3
45 lines (43 loc) · 1.63 KB
/
test.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
# Runs pytest on the matrix of supported platforms any Python versions.
name: Test
on:
pull_request:
jobs:
# You may remove this test, this merely assures that the template
# works when you find-and-replace the MyAssetManager strings.
test_project_rename:
name: Project Rename
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.11"
- run: |
grep -RIl 'MyAssetManager' | xargs sed -i 's/MyAssetManager/RenamedAssetManager/g'
grep -RIl 'my_asset_manager' | xargs sed -i 's/my_asset_manager/renamed_asset_manager/g'
grep -RIl 'My Asset Manager' | xargs sed -i 's/My Asset Manager/Renamed Asset Manager/g'
grep -RIl 'myorg' | xargs sed -i 's/myorg/renamedorg/g'
mv plugin/my_asset_manager/MyAssetManagerInterface.py \
plugin/my_asset_manager/RenamedAssetManagerInterface.py
mv plugin/my_asset_manager plugin/renamed_asset_manager
python -m pip install .
python -m pip install -r tests/requirements.txt
python -m pytest -v ./tests
test:
name: ${{ matrix.os }} ${{ matrix.python }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: ["windows-latest", "ubuntu-latest", "macos-13"]
python: ["3.10", "3.11"]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
- run: |
python -m pip install .
python -m pip install -r tests/requirements.txt
python -m pytest -v ./tests