|
56 | 56 | runs-on: ${{ matrix.os }}
|
57 | 57 |
|
58 | 58 | # Skip redundant checks for library releases
|
59 |
| - if: "!startsWith(github.ref , 'refs/heads/release-library/')" |
| 59 | + if: "!startsWith(github.ref, 'refs/heads/release-library/')" |
60 | 60 |
|
61 | 61 | steps:
|
62 | 62 | - uses: actions/checkout@v2
|
|
89 | 89 | runs-on: ubuntu-latest
|
90 | 90 |
|
91 | 91 | # Skip redundant checks for library releases
|
92 |
| - if: "!startsWith(github.ref , 'refs/heads/release-library/')" |
| 92 | + if: "!startsWith(github.ref, 'refs/heads/release-library/')" |
93 | 93 |
|
94 | 94 | # Testing all features requires Docker container operations that are only available on
|
95 | 95 | # `ubuntu-latest`. This `test-all` job is to be seen as complementary to the `test` job. If
|
@@ -128,12 +128,57 @@ jobs:
|
128 | 128 | command: test
|
129 | 129 | args: --workspace --all-features
|
130 | 130 |
|
| 131 | + test-py: |
| 132 | + strategy: |
| 133 | + fail-fast: false |
| 134 | + matrix: |
| 135 | + python-version: [2.7, 3.7] |
| 136 | + |
| 137 | + # Skip redundant checks for binary releases |
| 138 | + if: "!startsWith(github.ref, 'refs/heads/release/')" |
| 139 | + |
| 140 | + name: Test Python ${{ matrix.python-version }} |
| 141 | + |
| 142 | + steps: |
| 143 | + - uses: actions/checkout@v2 |
| 144 | + with: |
| 145 | + submodules: recursive |
| 146 | + |
| 147 | + - uses: actions-rs/toolchain@v1 |
| 148 | + id: toolchain |
| 149 | + with: |
| 150 | + toolchain: stable |
| 151 | + profile: minimal |
| 152 | + override: true |
| 153 | + |
| 154 | + - uses: actions/setup-python@v2 |
| 155 | + with: |
| 156 | + python-version: ${{ matrix.python-version }} |
| 157 | + |
| 158 | + - name: Install Dependencies |
| 159 | + run: pip install -U pytest |
| 160 | + |
| 161 | + - uses: actions/cache@v2 |
| 162 | + with: |
| 163 | + path: | |
| 164 | + ~/.cargo/registry |
| 165 | + ~/.cargo/git |
| 166 | + target |
| 167 | + key: pytest-${{ runner.os }}-${{ steps.toolchain.outputs.rustc_hash }}-${{ hashFiles('**/Cargo.lock') }} |
| 168 | + |
| 169 | + - name: Build and Install Library |
| 170 | + run: pip install -v --editable py |
| 171 | + env: RELAY_DEBUG=1 |
| 172 | + |
| 173 | + - name: Run Python Tests |
| 174 | + run: pytest -v py |
| 175 | + |
131 | 176 | test-integration:
|
132 | 177 | name: Integration Tests
|
133 | 178 | runs-on: ubuntu-latest
|
134 | 179 |
|
135 | 180 | # Skip redundant checks for library releases
|
136 |
| - if: "!startsWith(github.ref , 'refs/heads/release-library/')" |
| 181 | + if: "!startsWith(github.ref, 'refs/heads/release-library/')" |
137 | 182 |
|
138 | 183 | services:
|
139 | 184 | redis: # https://docs.github.com/en/actions/guides/creating-redis-service-containers
|
@@ -193,7 +238,7 @@ jobs:
|
193 | 238 |
|
194 | 239 | cargo_docs:
|
195 | 240 | name: Cargo Docs
|
196 |
| - if: "!startsWith(github.ref , 'refs/heads/release')" |
| 241 | + if: "!startsWith(github.ref, 'refs/heads/release')" |
197 | 242 | runs-on: ubuntu-latest
|
198 | 243 | steps:
|
199 | 244 | - uses: actions/checkout@v2
|
@@ -227,7 +272,7 @@ jobs:
|
227 | 272 |
|
228 | 273 | event_schema:
|
229 | 274 | name: Event Schema
|
230 |
| - if: "!startsWith(github.ref , 'refs/heads/release')" |
| 275 | + if: "!startsWith(github.ref, 'refs/heads/release')" |
231 | 276 | runs-on: ubuntu-latest
|
232 | 277 | steps:
|
233 | 278 | - uses: actions/checkout@v2
|
@@ -288,7 +333,7 @@ jobs:
|
288 | 333 |
|
289 | 334 | metrics_docs:
|
290 | 335 | name: Metrics Docs
|
291 |
| - if: "!startsWith(github.ref , 'refs/heads/release')" |
| 336 | + if: "!startsWith(github.ref, 'refs/heads/release')" |
292 | 337 | runs-on: ubuntu-latest
|
293 | 338 | steps:
|
294 | 339 | - uses: actions/checkout@v2
|
|
0 commit comments