feat: code suggestions #623
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Code Review GPT CI | |
on: | |
pull_request: | |
branches: [main] | |
permissions: | |
id-token: write | |
pull-requests: write | |
contents: read | |
actions: read | |
jobs: | |
build_and_test_crgpt_package: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: code-review-gpt | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
BASE_SHA: ${{ github.event.pull_request.base.sha }} | |
GITHUB_SHA: ${{ github.sha }} | |
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} | |
CLOUDFLARE_WORKER_HEALTH_URL: ${{ secrets.CLOUDFLARE_WORKER_HEALTH_URL }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
- name: Install dependencies | |
run: npm ci | |
- name: Build package | |
run: npm run build | |
- name: Run code review script | |
run: npm run start -- --ci=github --model=gpt-3.5-turbo | |
- name: Run linting test | |
run: npm run lint-test | |
- name: Run unit tests | |
run: npm run test-unit | |
# Removing integration tests for now, till we have a proper workspace setup | |
# - name: Run integration tests | |
# run: npm run test-integ | |
- name: Run prompt tests | |
run: npm run test -- --ci=github --model=gpt-3.5-turbo | |
# build_and_test_core: | |
# runs-on: ubuntu-latest | |
# env: | |
# CI: true | |
# AWS_REGION: eu-west-2 | |
# APP_ID: ${{ secrets.APP_ID }} | |
# WEBHOOK_SECRET: ${{ secrets.WEBHOOK_SECRET }} | |
# PRIVATE_KEY: ${{ secrets.PRIVATE_KEY }} | |
# defaults: | |
# run: | |
# working-directory: services/core | |
# shell: bash | |
# steps: | |
# - uses: actions/checkout@v3 | |
# with: | |
# fetch-depth: 0 | |
# - name: Setup Node.js | |
# id: setup-node | |
# uses: actions/setup-node@v3 | |
# with: | |
# node-version: 18 | |
# - name: Configure AWS Credentials | |
# uses: aws-actions/configure-aws-credentials@v4 | |
# with: | |
# aws-region: ${{ env.AWS_REGION }} | |
# role-to-assume: ${{ secrets.AWS_ROLE_ARN_STAGING }} | |
# - name: Install pnpm | |
# run: npm i -g pnpm | |
# - name: 🚀 Deploy core to staging | |
# run: pnpm i && pnpm deploy-staging |