Skip to content

Commit 7aca897

Browse files
committed
Diagram how the testing workflow runs
1 parent b88238c commit 7aca897

File tree

1 file changed

+71
-2
lines changed

1 file changed

+71
-2
lines changed

README.md

Lines changed: 71 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -430,11 +430,80 @@ There are tests for testing EQL against PostgreSQL versions 14–17, that verify
430430
- Validating schemas for EQL configuration, encrypted data, and encrypted index
431431
- Using PostgreSQL operators on encrypted data and indexes (`=`, `<>`, `@>`)
432432

433-
The easiest way to run the tests is in GitHub Actions:
433+
The easiest way to run the tests [is in GitHub Actions](./.github/workflows/test-eql.yml)
434434

435-
- [Automatically whenever there are changes](./.github/workflows/test-eql.yml) in the `sql/`, `tests/`, or `tasks/` directories
435+
- Automatically whenever there are changes in the `sql/`, `tests/`, or `tasks/` directories
436436
- By manually running [the workflow](https://github.com/cipherstash/encrypt-query-language/actions/workflows/test-eql.yml)
437437

438+
This is how the `test-eql.yml` workflow functions:
439+
440+
```mermaid
441+
---
442+
title: Testing EQL
443+
---
444+
stateDiagram-v2
445+
direction LR
446+
classDef code font-family:monospace;
447+
448+
449+
state "🧍 Human makes changes to EQL sources" as changes
450+
state sources_fork <<fork>>
451+
state sources_join <<join>>
452+
state "sql/*.sql" as source_sql
453+
state "tasks/**/*" as source_tasks
454+
state "tests/**/*" as source_tests
455+
state sources_changed <<choice>>
456+
457+
state "🛠️ Trigger GitHub Actions workflow test-eql.yml" as build_triggered
458+
state "Matrix: Test EQL SQL components" as matrix
459+
state "Test with Postgres 14" as pg14
460+
state "Test with Postgres 15" as pg15
461+
state "Test with Postgres 16" as pg16
462+
state "Test with Postgres 17" as pg17
463+
state "Check build results" as check
464+
state if_state <<choice>>
465+
466+
changes --> sources_fork
467+
sources_fork --> source_sql:::code
468+
sources_fork --> source_tests:::code
469+
sources_fork --> source_tasks:::code
470+
source_sql --> sources_join
471+
source_tests --> sources_join
472+
source_tasks --> sources_join
473+
sources_join --> source_changed_check
474+
source_changed_check --> sources_changed
475+
sources_changed --> build_triggered : Some changes
476+
sources_changed --> [*]: No changes
477+
478+
state "Check source changes" as source_changed_check
479+
480+
[*] --> changes
481+
482+
build_triggered --> matrix
483+
484+
state fork_state <<fork>>
485+
matrix --> fork_state
486+
fork_state --> pg14
487+
fork_state --> pg15
488+
fork_state --> pg16
489+
fork_state --> pg17
490+
491+
state join_state <<join>>
492+
pg14 --> join_state
493+
pg15 --> join_state
494+
pg16 --> join_state
495+
pg17 --> join_state
496+
497+
state "✅ Pass build" as build_pass
498+
state "❌ Fail build" as build_fail
499+
join_state --> check
500+
check --> if_state
501+
if_state --> build_pass: All success
502+
if_state --> build_fail : Any failures
503+
build_pass --> [*]
504+
build_fail --> [*]
505+
```
506+
438507
You can also run the tests locally when doing local development.
439508

440509
### Running tests locally

0 commit comments

Comments
 (0)