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

CI: Create a github action which runs all unit-tests #1

Merged
merged 1 commit into from
Mar 6, 2024
Merged
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
24 changes: 24 additions & 0 deletions .github/workflows/test-rust.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: rust-unit-tests
run-name: $${ github.actor }} - Unit Tests
on: [push]
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
- name: Create Sqlite database
uses: actions-rs/cargo@v1
with:
command: install
args: sqlx-cli
- run: make db
- uses: actions-rs/cargo@v1
with:
command: test
args: --workspace --all-features

2 changes: 0 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,5 @@ members = [
]

[dependencies]
lsps-client = { path = "plugins/lsps-client/" }
lsps-server = { path = "plugins/lsps-server/" }
lsp-primitives = {path = "libs/lsp-primitives"}
cln-lsps = {path = "libs/cln-lsps" }
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ all: lsps-server lsps-client
base:
mkdir -p build/plugins

# Initiates a database that is used for testing
db: plugins/lsps-server/data/lsp_server.db

plugins/lsps-server/data/lsp_server.db:
mkdir -p plugins/lsps-server/data
sqlx database create --database-url sqlite:plugins/lsps-server/data/lsp_server.db
Expand Down
Loading