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

Feature/cd ci config #40

Merged
merged 12 commits into from
Oct 31, 2024
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
Loading