Skip to content

Commit

Permalink
feat(storage-sqlite): update storage with sqlite & prisma (#97)
Browse files Browse the repository at this point in the history
Co-authored-by: Rémi Roycourt <[email protected]>
  • Loading branch information
kwiss and remiroyc authored Sep 26, 2023
1 parent 0591c71 commit a20b814
Show file tree
Hide file tree
Showing 22 changed files with 4,161 additions and 437 deletions.
2 changes: 2 additions & 0 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[alias]
prisma = "run -p ark-prisma-cli --"
35 changes: 31 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- name: Get current date
id: date
run: echo "::set-output name=date::$(date +'%Y-%m-%d')"

check:
needs: setup
name: Check
Expand All @@ -34,6 +34,13 @@ jobs:
profile: minimal
toolchain: stable
override: true

- name: Prisma generate
uses: actions-rs/cargo@v1
with:
command: prisma
args: generate

- name: Run cargo check
uses: actions-rs/cargo@v1
with:
Expand All @@ -42,18 +49,23 @@ jobs:
codecoverage:
if: github.event_name == 'pull_request'
needs: check
name: Test
name: Coverage
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v2
- name: Cache cargo dependencies
uses: Swatinem/rust-cache@v2
- name: Prisma generate
uses: actions-rs/cargo@v1
with:
command: prisma
args: generate
- name: Run cargo-tarpaulin
uses: actions-rs/[email protected]
with:
version: '0.15.0'
args: '-- --test-threads 1'
version: "0.15.0"
args: "-- --test-threads 1"
- name: Upload to codecov.io
uses: codecov/[email protected]
with:
Expand All @@ -73,6 +85,13 @@ jobs:
uses: actions/checkout@v2
- name: Cache cargo dependencies
uses: Swatinem/rust-cache@v2

- name: Prisma generate
uses: actions-rs/cargo@v1
with:
command: prisma
args: generate

- name: Run cargo test
uses: actions-rs/cargo@v1
with:
Expand All @@ -95,11 +114,19 @@ jobs:
toolchain: stable
override: true
components: rustfmt, clippy

- name: Prisma generate
uses: actions-rs/cargo@v1
with:
command: prisma
args: generate

- name: Run cargo fmt
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check

- name: Run cargo clippy
uses: actions-rs/cargo@v1
with:
Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,7 @@ crates/ark-metadata/images/**/*

.env
.aws

# Prisma
crates/ark-storage/src/prisma.rs
*/dev.db
Loading

0 comments on commit a20b814

Please sign in to comment.