Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setup e2e tests #185

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 25 additions & 2 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,15 @@ jobs:
CARGO_FLAGS: --profile ci --features kamu/ingest-ftp
NEXTEST_FLAGS: --cargo-profile ci --features kamu/ingest-ftp
KAMU_CONTRACTS_DIR: ../../../kamu-contracts
services:
postgres:
image: 'postgres:16'
env:
POSTGRES_USER: root
POSTGRES_PASSWORD: root
POSTGRES_DB: kamu-test
ports:
- 5432:5432
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v4
Expand All @@ -76,7 +85,21 @@ jobs:
run: |
npm ci
forge build
- name: Run tests
run: cargo nextest run ${{ env.NEXTEST_FLAGS }}

- name: Run main set of tests
run: cargo nextest run ${{ env.NEXTEST_FLAGS }} -E '!(test(::database::) | test(::spark::)| test(::flink::))'

- name: SQLite database tests
env:
SQLX_OFFLINE: false
DATABASE_URL: sqlite://kamu.sqlite.db
run: cargo nextest run ${{ env.NEXTEST_FLAGS }} -E 'platform(target) & test(::sqlite::)'

- name: Postgres database tests
env:
SQLX_OFFLINE: false
DATABASE_URL: postgres://root:root@localhost:5432/kamu-test
run: cargo nextest run ${{ env.NEXTEST_FLAGS }} -E 'platform(target) & test(::postgres::)'

- name: Check git diff
run: git diff && git diff-index --quiet HEAD
242 changes: 242 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 15 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@ members = [
# Apps
"src/app/api-server",
"src/app/oracle-provider",
# E2E
"src/e2e/app/common",
"src/e2e/app/common-macros",
"src/e2e/app/kamu-node-puppet",
"src/e2e/app/repo-tests",
"src/e2e/app/postgres",
"src/e2e/app/sqlite",
]
resolver = "2"

Expand Down Expand Up @@ -71,6 +78,14 @@ kamu-task-system-inmem = { git = "https://github.com/kamu-data/kamu-cli", tag =
kamu-task-system-postgres = { git = "https://github.com/kamu-data/kamu-cli", tag = "v0.221.0", version = "0.221.0", default-features = false }
kamu-task-system-sqlite = { git = "https://github.com/kamu-data/kamu-cli", tag = "v0.221.0", version = "0.221.0", default-features = false }

#E2E
kamu-cli-e2e-common = { git = "https://github.com/kamu-data/kamu-cli", tag = "v0.221.0", version = "0.221.0", default-features = false }

# Workspace E2E
kamu-node-e2e-common = { path = "src/e2e/app/common", version = "0.53.0", default-features = false }
kamu-node-e2e-common-macros = { path = "src/e2e/app/common-macros", version = "0.53.0", default-features = false }
kamu-node-puppet = { path = "src/e2e/app/kamu-node-puppet", version = "0.53.0", default-features = false }
kamu-node-e2e-repo-tests = { path = "src/e2e/app/repo-tests", version = "0.53.0", default-features = false }

[workspace.package]
version = "0.53.0"
Expand Down
Loading
Loading