Skip to content

Commit ea56089

Browse files
fix(ci): added some tests to CI and pre-commit, that were missed earlier (#458)
1 parent 1f0746d commit ea56089

5 files changed

Lines changed: 34 additions & 116 deletions

File tree

.github/workflows/correctness.yml

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -140,31 +140,3 @@ jobs:
140140
- name: Compare serialised patterns
141141
working-directory: asap-common/tests/compare_patterns
142142
run: python compare_serialized_patterns.py
143-
144-
# ── 3. Rust pattern-matching unit tests ────────────────────────────────────
145-
rust-pattern-matching:
146-
if: github.event_name != 'pull_request' || github.event.pull_request.draft == false
147-
name: Rust pattern matching unit tests
148-
runs-on: ubuntu-latest
149-
steps:
150-
- uses: actions/checkout@v4
151-
152-
- name: Install Rust
153-
uses: dtolnay/rust-toolchain@stable
154-
155-
- name: Install protoc
156-
run: |
157-
sudo apt-get update -qq
158-
sudo apt-get install -y protobuf-compiler
159-
160-
- name: Run sccache
161-
uses: mozilla-actions/sccache-action@v0.0.4
162-
163-
- name: Cache cargo
164-
uses: actions/cache@v4
165-
with:
166-
path: |
167-
~/.cargo/registry
168-
~/.cargo/git
169-
target
170-
key: ${{ runner.os }}-cargo-correctness-${{ hashFiles('**/Cargo.lock', '**/Cargo.toml') }}

.github/workflows/python.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ on:
88
- 'asap-tools/**'
99
- 'asap-tools/data-sources/prometheus-exporters/**'
1010
- 'asap-tools/execution-utilities/**'
11+
- 'asap-summary-ingest/**'
1112
- 'asap-common/dependencies/py/**'
1213
- '.github/workflows/python.yml'
1314
pull_request:
@@ -18,6 +19,7 @@ on:
1819
- 'asap-tools/**'
1920
- 'asap-tools/data-sources/prometheus-exporters/**'
2021
- 'asap-tools/execution-utilities/**'
22+
- 'asap-summary-ingest/**'
2123
- 'asap-common/dependencies/py/**'
2224
- '.github/workflows/python.yml'
2325
workflow_dispatch:
@@ -39,6 +41,7 @@ jobs:
3941
utilities: ${{ steps.filter.outputs.utilities }}
4042
prometheus_exporters: ${{ steps.filter.outputs.prometheus_exporters }}
4143
execution_utilities: ${{ steps.filter.outputs.execution_utilities }}
44+
summary_ingest: ${{ steps.filter.outputs.summary_ingest }}
4245
steps:
4346
- uses: actions/checkout@v4
4447
- uses: dorny/paths-filter@v2
@@ -57,6 +60,9 @@ jobs:
5760
execution_utilities:
5861
- 'asap-tools/execution-utilities/**'
5962
- 'asap-common/dependencies/py/**'
63+
summary_ingest:
64+
- 'asap-summary-ingest/**'
65+
- 'asap-common/dependencies/py/**'
6066
6167
test-prometheus-client:
6268
needs: detect-changes
@@ -182,3 +188,21 @@ jobs:
182188
flake8 . --config=../../.flake8 --count --select=E9,F63,F7,F82 --show-source --statistics
183189
# Exit-zero treats all errors as warnings
184190
flake8 . --config=../../.flake8 --count --exit-zero --max-complexity=10 --statistics
191+
192+
test-summary-ingest:
193+
needs: detect-changes
194+
if: needs.detect-changes.outputs.summary_ingest == 'true'
195+
runs-on: ubuntu-latest
196+
steps:
197+
- uses: actions/checkout@v4
198+
- name: Set up Python
199+
uses: actions/setup-python@v4
200+
with:
201+
python-version: '3.11'
202+
- name: Install dependencies
203+
run: |
204+
python -m pip install --upgrade pip
205+
pip install -e asap-common/dependencies/py/promql_utilities/
206+
pip install pytest pyyaml jinja2
207+
- name: Run pytest
208+
run: python -m pytest asap-summary-ingest/tests/ -v

.github/workflows/rust.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ on:
55
branches: [ main ]
66
paths:
77
- 'asap-query-engine/**'
8+
- 'asap-planner-rs/**'
89
- 'asap-common/dependencies/rs/**'
910
- 'asap-common/tests/**'
1011
- 'asap-common/sketch-core/**'
@@ -16,6 +17,7 @@ on:
1617
branches: [ main ]
1718
paths:
1819
- 'asap-query-engine/**'
20+
- 'asap-planner-rs/**'
1921
- 'asap-common/dependencies/rs/**'
2022
- 'asap-common/tests/**'
2123
- 'asap-common/sketch-core/**'

.pre-commit-config.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,3 +100,11 @@ repos:
100100
language: system
101101
files: \.rs$
102102
pass_filenames: false
103+
104+
- id: pytest-summary-ingest
105+
name: pytest (asap-summary-ingest)
106+
description: Run asap-summary-ingest unit tests against vendored promql_utilities.
107+
entry: bash -c 'pip install -q -e asap-common/dependencies/py/promql_utilities/ && python3 -m pytest asap-summary-ingest/tests/'
108+
language: system
109+
files: ^(asap-summary-ingest|asap-common/dependencies/py)/
110+
pass_filenames: false

asap-tools/experiments/experiment_utils/test_local_provider.py

Lines changed: 0 additions & 88 deletions
This file was deleted.

0 commit comments

Comments
 (0)