Skip to content

Commit

Permalink
Setup initial integration tests & misc configurations (#9)
Browse files Browse the repository at this point in the history
  • Loading branch information
artfuldev authored Sep 10, 2024
1 parent 67af498 commit 5df2c6f
Show file tree
Hide file tree
Showing 12 changed files with 894 additions and 68 deletions.
5 changes: 5 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
root = true

[*]
end_of_line = lf
insert_final_newline = true
35 changes: 35 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: ci

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
run-tests:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Set up Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
override: true

- name: Cache cargo registry
uses: actions/cache@v3
with:
path: ~/.cargo/registry
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-registry-
- name: Run tests
run: cargo test
139 changes: 139 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,139 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "lldb",
"request": "launch",
"name": "Debug unit tests in library 'spaced'",
"cargo": {
"args": [
"test",
"--no-run",
"--lib",
"--package=spaced"
],
"filter": {
"name": "spaced",
"kind": "lib"
}
},
"args": [],
"cwd": "${workspaceFolder}"
},
{
"type": "lldb",
"request": "launch",
"name": "Debug executable 'space-cli'",
"cargo": {
"args": [
"build",
"--bin=space-cli",
"--package=spaced"
],
"filter": {
"name": "space-cli",
"kind": "bin"
}
},
"args": [],
"cwd": "${workspaceFolder}"
},
{
"type": "lldb",
"request": "launch",
"name": "Debug unit tests in executable 'space-cli'",
"cargo": {
"args": [
"test",
"--no-run",
"--bin=space-cli",
"--package=spaced"
],
"filter": {
"name": "space-cli",
"kind": "bin"
}
},
"args": [],
"cwd": "${workspaceFolder}"
},
{
"type": "lldb",
"request": "launch",
"name": "Debug executable 'spaced'",
"cargo": {
"args": [
"build",
"--bin=spaced",
"--package=spaced"
],
"filter": {
"name": "spaced",
"kind": "bin"
}
},
"args": [],
"cwd": "${workspaceFolder}"
},
{
"type": "lldb",
"request": "launch",
"name": "Debug unit tests in executable 'spaced'",
"cargo": {
"args": [
"test",
"--no-run",
"--bin=spaced",
"--package=spaced"
],
"filter": {
"name": "spaced",
"kind": "bin"
}
},
"args": [],
"cwd": "${workspaceFolder}"
},
{
"type": "lldb",
"request": "launch",
"name": "Debug unit tests in library 'protocol'",
"cargo": {
"args": [
"test",
"--no-run",
"--lib",
"--package=protocol"
],
"filter": {
"name": "protocol",
"kind": "lib"
}
},
"args": [],
"cwd": "${workspaceFolder}"
},
{
"type": "lldb",
"request": "launch",
"name": "Debug unit tests in library 'wallet'",
"cargo": {
"args": [
"test",
"--no-run",
"--lib",
"--package=wallet"
],
"filter": {
"name": "wallet",
"kind": "lib"
}
},
"args": [],
"cwd": "${workspaceFolder}"
}
]
}
8 changes: 8 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"cSpell.words": [
"bitcoind",
"regtest",
"tempdir",
"tempfile"
]
}
Loading

0 comments on commit 5df2c6f

Please sign in to comment.