-
Notifications
You must be signed in to change notification settings - Fork 9
53 lines (50 loc) · 1.35 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
46
47
48
49
50
51
52
53
name: Run tests
on:
pull_request:
push:
branches: [ main ]
tags: [ 'v*.*.*' ]
permissions:
contents: read
jobs:
test:
name: Test
strategy:
max-parallel: 5
matrix:
os: [macos-latest, ubuntu-latest]
source: ["general", "spark", "gateway-over-duckdb", "gateway-over-datafusion"]
class: ["sql", "-sql"]
python: ["3.10"]
architecture: ["x64"]
exclude:
- source: general
class: sql
runs-on: ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
submodules: recursive
- name: Install packages and test dependencies
uses: conda-incubator/setup-miniconda@v3
with:
activate-environment: spark-substrait-gateway-env
environment-file: environment.yml
python-version: ${{ matrix.python }}
auto-activate-base: false
miniforge-version: "latest"
- name: Build
shell: bash -el {0}
run: |
pip install -e .
- name: Run tests
shell: bash -el {0}
id: run_tests
run: |
UPDATED_CLASS=${{ matrix.class }}
if [[ $UPDATED_CLASS == -* ]] ;
then
UPDATED_CLASS="not ${UPDATED_CLASS#-}"
fi
pytest -m "${{ matrix.source }} and $UPDATED_CLASS"