-
-
Notifications
You must be signed in to change notification settings - Fork 1
79 lines (65 loc) · 1.54 KB
/
ci_cd.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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
name: CI/CD
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
ci-cd:
runs-on: ubuntu-latest
permissions:
contents: write
id-token: write
services:
mongodb:
image: mongo:latest
ports:
- 27017:27017
redis:
image: redis:latest
ports:
- 6379:6379
mysql:
image: mysql:5.7
ports:
- 3306:3306
env:
MYSQL_ROOT_PASSWORD: password
MYSQL_DATABASE: test
postgres:
image: postgres:latest
ports:
- 5432:5432
env:
POSTGRES_PASSWORD: postgres
steps:
- name: Check out repository
uses: actions/checkout@v3
- name: Set up Node.js
uses: oven-sh/setup-bun@v1
- name: Install dependencies
run: |
bun install
- name: Lint with Eslint
run: |
bun run lint
- name: Check code formatting
run: |
bun run format:check
- name: Unit tests
run: |
bun test
env:
MONGO_URI: mongodb://127.0.0.1:27017/test
REDIS_URI: redis://127.0.0.1:6379
MYSQL_URI: mysql://root:[email protected]:3306/test
POSTGRES_URI: postgres://postgres:[email protected]:5432/postgres
- id: semantic-release
name: Run semantic-release
run: |
npx semantic-release
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}