forked from AcademySoftwareFoundation/rez
-
Notifications
You must be signed in to change notification settings - Fork 0
96 lines (81 loc) · 2.33 KB
/
tests.yaml
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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
name: tests
on:
pull_request:
paths:
- 'src/**'
- 'install.py'
- 'setup.py'
- 'MANIFEST.in'
- 'pyproject.toml'
- '.github/workflows/tests.yaml'
- '!src/rez/utils/_version.py'
- '!**.md'
push:
paths:
- 'src/**'
- 'install.py'
- 'setup.py'
- 'MANIFEST.in'
- 'pyproject.toml'
- '.github/workflows/tests.yaml'
- '!src/rez/utils/_version.py'
- '!**.md'
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
core:
name: Tests
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: ['macos-latest', 'ubuntu-latest', 'windows-latest']
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']
include:
- os: macos-latest
shells: 'sh,csh,bash,tcsh,zsh,pwsh'
rez-path: /installdir/bin/rez
- os: ubuntu-latest
shells: 'sh,csh,bash,tcsh,zsh,pwsh'
rez-path: /installdir/bin/rez
- os: windows-latest
shells: 'cmd,pwsh,gitbash'
rez-path: \installdir\Scripts\rez
fail-fast: false
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install test system dependencies (linux)
if: ${{ startsWith(matrix.os, 'ubuntu-') }}
run: |
set -ex
sudo apt-get update
cmake --version
pwsh --version
sudo apt-get install -y csh tcsh zsh
- name: Install rez
run: python ./install.py ./installdir
- name: Setup environment variables
shell: bash
env:
_GH_REZ_INSTALL_PATH: ${{ github.workspace }}${{ matrix.rez-path }}
run: |
echo "$_GH_REZ_INSTALL_PATH" >> $GITHUB_PATH
- name: Install test dependencies
run: rez-python -m pip install pytest-cov parameterized
- name: Run tests
run: rez-selftest -v -- --cov=rez --cov-report=xml:coverage.xml
env:
_REZ_ENSURE_TEST_SHELLS: ${{ matrix.shells }}
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4
with:
slug: AcademySoftwareFoundation/rez
files: 'coverage.xml'
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}