-
Notifications
You must be signed in to change notification settings - Fork 338
154 lines (133 loc) · 3.96 KB
/
core.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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
# Test core parts of the package, that are not:
# * Shell dependent;
# * Build-system dependent;
# * Platform dependent.
#
name: core
on:
pull_request:
paths:
- 'src/**'
- '.github/workflows/core.yaml'
- '!src/rez/utils/_version.py'
- '!**.md'
push:
paths:
- 'src/**'
- '.github/workflows/core.yaml'
- '!src/rez/utils/_version.py'
- '!**.md'
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
install_script:
name: install_script
runs-on: ubuntu-latest
strategy:
matrix:
python-version:
- '3.7'
fail-fast: false
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup python ${{ matrix.python-version }}
uses: ./.github/actions/setup-python
with:
python-version: ${{ matrix.python-version }}
os: ubuntu-latest
- name: Install Rez
shell: bash
run: |
set -ex
mkdir ./installdir
if [[ "${{ matrix.python-version }}" == "2.7" ]]; then
eval "$(conda shell.bash hook)"
conda activate python
fi
python --version
python ./install.py ./installdir
- name: Install Rez test dependencies
run: |
./installdir/bin/rez/rez-python -m pip install pytest-cov
# TODO: Add a --core rez-selftest option. Some test suites (eg test_context)
# have some 'core' parts (eg not reliant on a shell). It would be good to just
# run those parts when --core is present, rather than skipping the entire
# test class. This will be easier once ported to pytest.
- name: Run Rez Tests
run: |
./installdir/bin/rez/rez-selftest -v \
--config \
--copy_package \
--formatter \
--imports \
--packages \
--package_filter \
--packages_order \
--resources_ \
--rex \
--schema \
--solver \
--version
pip:
name: pip
runs-on: ubuntu-latest
strategy:
matrix:
python-version:
- '2.7'
- '3.7'
fail-fast: false
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup python ${{ matrix.python-version }}
uses: ./.github/actions/setup-python
with:
python-version: ${{ matrix.python-version }}
os: ubuntu-latest
- name: Install Rez
run: |
set -ex
if [[ "${{ matrix.python-version }}" == "2.7" ]]; then
eval "$(conda shell.bash hook)"
conda activate python
fi
python --version
python -m pip install .
- name: Install Rez test dependencies
run: |
set -ex
if [[ "${{ matrix.python-version }}" == "2.7" ]]; then
eval "$(conda shell.bash hook)"
conda activate python
fi
python --version
python -m pip install pytest pytest-cov
# TODO: Add a --core rez-selftest option. Some test suites (eg test_context)
# have some 'core' parts (eg not reliant on a shell). It would be good to just
# run those parts when --core is present, rather than skipping the entire
# test class. This will be easier once ported to pytest.
- name: Run Rez Tests
run: |
set -ex
if [[ "${{ matrix.python-version }}" == "2.7" ]]; then
eval "$(conda shell.bash hook)"
conda activate python
fi
python --version
rez-selftest -v \
--config \
--copy_package \
--formatter \
--imports \
--packages \
--package_filter \
--packages_order \
--resources_ \
--rex \
--schema \
--solver \
--version