diff --git a/.coderabbit.yaml b/.coderabbit.yaml new file mode 100644 index 0000000..77c1145 --- /dev/null +++ b/.coderabbit.yaml @@ -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 diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..942a116 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -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 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..292d722 --- /dev/null +++ b/.github/workflows/test.yml @@ -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 \ No newline at end of file