File tree Expand file tree Collapse file tree 2 files changed +76
-3
lines changed Expand file tree Collapse file tree 2 files changed +76
-3
lines changed Original file line number Diff line number Diff line change 1
- name : Backend CI
1
+ name : Backend
2
2
3
3
on : push
4
4
47
47
run : |
48
48
cd apps/backend
49
49
pnpm types:check
50
+
51
+ e2e :
52
+ runs-on : ubuntu-latest
53
+
54
+ services :
55
+ postgres :
56
+ image : postgres
57
+ env :
58
+ POSTGRES_USER : postgres_user
59
+ POSTGRES_PASSWORD : postgres_password
60
+ POSTGRES_DB : metro-now
61
+ options : >-
62
+ --health-cmd pg_isready
63
+ --health-interval 10s
64
+ --health-timeout 5s
65
+ --health-retries 5
66
+ ports :
67
+ - 5432:5432
68
+
69
+ redis :
70
+ image : redis
71
+ options : >-
72
+ --health-cmd "redis-cli ping"
73
+ --health-interval 10s
74
+ --health-timeout 5s
75
+ --health-retries 5
76
+ ports :
77
+ - 6379:6379
78
+
79
+ steps :
80
+ - name : Check out code
81
+ uses : actions/checkout@v4
82
+ with :
83
+ fetch-depth : 2
84
+
85
+ - uses : pnpm/action-setup@v4
86
+
87
+ - name : Setup Node.js environment
88
+ uses : actions/setup-node@v4
89
+ with :
90
+ node-version : 20
91
+ cache : " pnpm"
92
+
93
+ - name : Install dependencies
94
+ run : |
95
+ pnpm install
96
+
97
+
98
+ - name: Setup environment
99
+ run: |
100
+ cd apps/backend
101
+ tail -n +2 ".env.local.example" > ".env.local"
102
+ echo "GOLEMIO_API_KEY=${{ secrets.GOLEMIO_API_KEY }}" >> ".env.local"
103
+
104
+ - name : Prisma generate
105
+ run : |
106
+ cd apps/backend
107
+ pnpm prisma:generate
108
+
109
+ - name : Run migrations
110
+ run : |
111
+ cd apps/backend
112
+ pnpm prisma:migrate:deploy
113
+
114
+ - name : Run seeds
115
+ run : |
116
+ cd apps/backend
117
+ pnpm prisma:seed
118
+
119
+ - name : Test e2e
120
+ run : |
121
+ cd apps/backend
122
+ pnpm test:e2e
Original file line number Diff line number Diff line change 2
2
GOLEMIO_API_KEY=
3
3
4
4
# postgres
5
- POSTGRES_USER=pg_user
6
- POSTGRES_PASSWORD=pg_password
5
+ POSTGRES_USER=postgres_user
6
+ POSTGRES_PASSWORD=postgres_password
7
7
POSTGRES_DB=metro-now
8
8
9
9
You can’t perform that action at this time.
0 commit comments