-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (41 loc) · 1.93 KB
/
pr-check.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
name: Pull Request Checks
on:
pull_request:
branches: [main]
jobs:
build-and-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: "16"
- name: Install Dependencies
run: npm install
- name: Create .env file
run: |
echo "OPENAI_API_KEY=${{ secrets.OPENAI_API_KEY }}" >> .env
echo "DRIZZLE_DATABASE_URL=${{ secrets.DRIZZLE_DATABASE_URL }}" > .env
echo "NEXTAUTH_SECRET=${{ secrets.NEXTAUTH_SECRET }}" >> .env
echo "NEXTAUTH_URL=${{ secrets.NEXTAUTH_URL }}" >> .env
echo "GOOGLE_CLIENT_ID=${{ secrets.GOOGLE_CLIENT_ID }}" >> .env
echo "GOOGLE_CLIENT_SECRET=${{ secrets.GOOGLE_CLIENT_SECRET }}" >> .env
echo "NODE_ENV=${{ secrets.NODE_ENV }}" >> .env
echo "STRIPE_PRICE_ID=${{ secrets.STRIPE_PRICE_ID }}" >> .env
echo "STRIPE_SECRET_KEY=${{ secrets.STRIPE_SECRET_KEY }}" >> .env
echo "PUPU_PER_PURCHASE=${{ secrets.PUPU_PER_PURCHASE }}" >> .env
echo "VERIFICATION_MAIL_LIMIT=${{ secrets.VERIFICATION_MAIL_LIMIT }}" >> .env
echo "FORGOT_PASSWORD_MAIL_LIMIT=${{ secrets.FORGOT_PASSWORD_MAIL_LIMIT }}" >> .env
echo "EMAIL_LINK_EXPIRY=${{ secrets.EMAIL_LINK_EXPIRY }}" >> .env
echo "THEMES_PER_PAGE=${{ secrets.THEMES_PER_PAGE }}" >> .env
echo "NEXT_PUBLIC_TRACKING_ID=${{ secrets.TRACKING_ID }}" >> .env
echo "THEMEAI_ACCOUNT_ID=${{ secrets.THEMEAI_ACCOUNT_ID }}" >> .env
echo "MAIL_SMTP_HOST=${{ secrets.MAIL_SMTP_HOST }}" >> .env
echo "MAIL_SMTP_PORT=${{ secrets.MAIL_SMTP_PORT }}" >> .env
echo "MAIL_SMTP_USER=${{ secrets.MAIL_SMTP_USER }}" >> .env
echo "MAIL_SMTP_PASS=${{ secrets.MAIL_SMTP_PASS }}" >> .env
- name: Build
run: npm run build
- name: Run Unit Tests
run: npm test