Skip to content

Commit

Permalink
Feature/cd ci config (#40)
Browse files Browse the repository at this point in the history
  • Loading branch information
brolag authored Oct 31, 2024
1 parent 5c5bc72 commit 61b5b58
Show file tree
Hide file tree
Showing 3 changed files with 83 additions and 0 deletions.
15 changes: 15 additions & 0 deletions .coderabbit.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json
language: "en-US"
early_access: true
reviews:
profile: "chill"
request_changes_workflow: false
high_level_summary: true
poem: false
review_status: false
collapse_walkthrough: false
auto_review:
enabled: false
drafts: false
chat:
auto_reply: false
32 changes: 32 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Database Migration Pipeline

on:
push:
branches:
- main
paths:
- 'prisma/**'
pull_request:
branches:
- main

jobs:
migrate:
runs-on: ubuntu-latest
env:
DATABASE_URL: ${{ secrets.DATABASE_URL }}

steps:
- name: Check out the repository
uses: actions/checkout@v3

- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '18'

- name: Install dependencies
run: npm install -g prisma

- name: Run Prisma migrations
run: prisma migrate deploy
36 changes: 36 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: CI

on:
pull_request:
push:
branches:
- main
schedule:
- cron: "0 0 * * *" # Run daily at midnight

permissions: read-all

jobs:
test-contracts:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: foundry-rs/setup-snfoundry@v3
- uses: software-mansion/setup-scarb@v1
with:
tool-versions: ./apps/snfoundry/contracts/.tool-versions

- name: Run tests
run: cd apps/snfoundry/contracts && snforge test

lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: foundry-rs/setup-snfoundry@v3
- uses: software-mansion/setup-scarb@v1
with:
tool-versions: ./apps/snfoundry/contracts/.tool-versions

- name: Check formatting
run: cd apps/snfoundry/contracts && scarb fmt --check

0 comments on commit 61b5b58

Please sign in to comment.