Repository navigation
73 lines (68 loc) · 2.53 KB
/
Copy pathengine-postgres.yml
File metadata and controls
73 lines (68 loc) · 2.53 KB
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
name: Engine (PostgreSQL)
# Runs the PostgreSQL backend's SQL in a real PostgreSQL server, for the shared
# engine cases and for SigmaHQ rules whose conditions need grouping (checked
# against eval). Triggered only by changes to that backend, its engine tests,
# the shared engine cases, the shared conversion core, or eval.
on:
push:
branches: [main]
paths: &paths
- ".github/actions/setup-rust/**"
- "Cargo.toml"
- "Cargo.lock"
- "rust-toolchain.toml"
- "crates/rsigma-convert/Cargo.toml"
- "crates/rsigma-convert/src/*.rs"
- "crates/rsigma-convert/src/backends/postgres/**"
- "crates/rsigma-parser/Cargo.toml"
- "crates/rsigma-parser/src/**"
- "crates/rsigma-ir/Cargo.toml"
- "crates/rsigma-ir/src/**"
- "crates/rsigma-eval/Cargo.toml"
- "crates/rsigma-eval/src/**"
- "crates/rsigma-convert/tests/engines/mod.rs"
- "crates/rsigma-convert/tests/engines/corpus.rs"
- "crates/rsigma-convert/tests/engines/cases/**"
- "crates/rsigma-convert/tests/engine_postgres.rs"
- "crates/rsigma-convert/tests/postgres_integration.rs"
- ".github/workflows/engine-postgres.yml"
pull_request:
branches: [main]
paths: *paths
workflow_dispatch:
permissions: {}
concurrency:
group: engine-postgres-${{ github.ref }}
cancel-in-progress: true
env:
CARGO_TERM_COLOR: always
RUSTFLAGS: -Dwarnings
jobs:
postgres:
name: PostgreSQL engine tests
runs-on: ubuntu-latest
permissions:
contents: read # read repo for checkout
# Same pinned SigmaHQ commit as the corpus regression job in ci.yml.
env:
SIGMA_CORPUS_SHA: "994da16651194500b607a3007186c29779e1f961"
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: $/.github/actions/setup-rust
- uses: Swatinem/rust-cache@d1527c8f67ef9af357290475d4af4b0fab8f12e0 # v2.9.3
with:
save-if: ${{ github.ref == 'refs/heads/main' }}
- name: Fetch SigmaHQ rules at pinned SHA
run: |
mkdir -p /tmp/sigma
cd /tmp/sigma
git init -q
git remote add origin https://github.com/SigmaHQ/sigma.git
git fetch --depth 1 origin "${SIGMA_CORPUS_SHA}"
git checkout -q FETCH_HEAD
- name: Run the cases and the SigmaHQ rules in PostgreSQL
env:
RSIGMA_SIGMA_CORPUS: /tmp/sigma
run: cargo test -p rsigma-convert --locked --test engine_postgres --test postgres_integration -- --ignored