-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (40 loc) · 1003 Bytes
/
node.js.yml
File metadata and controls
42 lines (40 loc) · 1003 Bytes
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
name: Node.js CI
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
jobs:
build:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:12.8-alpine
ports:
- "5432:5432"
env:
POSTGRES_USER: "admin"
POSTGRES_PASSWORD: "password"
POSTGRES_DB: "my-project"
mongo:
image: mongo:6.0.7-jammy
env:
MONGO_INITDB_ROOT_USERNAME: admin
MONGO_INITDB_ROOT_PASSWORD: password
ports:
- "27017:27017"
steps:
- uses: actions/checkout@v3
- name: Use Node.js 18
uses: actions/setup-node@v3
with:
node-version: 18
cache: "npm"
- run: npm ci
- run: npm run lint:check
- run: npm run format:check
- run: npm run migrate
- run: npm run test:all
env:
MAILGUN_API_KEY: ${{ secrets.MAILGUN_API_KEY }}
TESTMAIL_API_KEY: ${{ secrets.TESTMAIL_API_KEY }}