-
Notifications
You must be signed in to change notification settings - Fork 1
43 lines (32 loc) · 1009 Bytes
/
node.js.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
name: Code Crafters E-commerce CI
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
env:
DATABASE_TEST_URL: ${{ secrets.DATABASE_TEST_URL }}
PORT: 5000
GOOGLE_CLIENT_ID: ${{ secrets.GOOGLE_CLIENT_ID }}
GOOGLE_CLIENT_SECRET: ${{ secrets.GOOGLE_CLIENT_SECRET }}
GOOGLE_CALLBACK_URL: ${{ secrets.GOOGLE_CALLBACK_URL }}
HOST_MODE: remote
NODE_ENV: test
steps:
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: '20.x'
- name: Install dependencies
run: npm install
- name: Build
run: npm run build --if-present
- name: Verify environment variables
run: |
echo "MODE=$MODE"
echo "DATABASE_TEST_URL=$DATABASE_TEST_URL"
echo "GOOGLE_CALLBACK_URL=$GOOGLE_CALLBACK_URL"
echo "GOOGLE_CALLBACK_ID=$GOOGLE_CLIENT_ID"
echo "NODE_ENV=$NODE_ENV"
- name: Run tests
run: npm run test