-
-
Notifications
You must be signed in to change notification settings - Fork 526
117 lines (116 loc) · 3.98 KB
/
ci.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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
name: CI
on:
push:
branches:
- main
- v6
- v7
pull_request:
jobs:
test-postgres:
strategy:
fail-fast: false
matrix:
node-version: [10, 16]
sequelize-version: [5, latest]
name: Postgres (Node ${{ matrix.node-version }}, Sequelize ${{ matrix.sequelize-version }})
runs-on: ubuntu-latest
env:
DIALECT: postgres
SEQ_PORT: 54320
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- run: yarn install --frozen-lockfile --ignore-engines
- run: yarn add sequelize@${{ matrix.sequelize-version }} --ignore-engines
- run: docker-compose up -d ${DIALECT}
- run: docker run --link ${DIALECT}:db -e CHECK_PORT=${SEQ_PORT::-1} -e CHECK_HOST=db --net cli_default giorgos/takis
- run: yarn test
test-mysql:
strategy:
fail-fast: false
matrix:
node-version: [10, 16]
sequelize-version: [5, latest]
name: MySQL (Node ${{ matrix.node-version }}, Sequelize ${{ matrix.sequelize-version }})
runs-on: ubuntu-latest
env:
DIALECT: mysql
SEQ_PORT: 33060
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- run: yarn install --frozen-lockfile --ignore-engines
- run: yarn add sequelize@${{ matrix.sequelize-version }} --ignore-engines
- run: docker-compose up -d ${DIALECT}
- run: docker run --link ${DIALECT}:db -e CHECK_PORT=${SEQ_PORT::-1} -e CHECK_HOST=db --net cli_default giorgos/takis
- run: yarn test
test-mariadb:
strategy:
fail-fast: false
matrix:
node-version: [10, 16]
sequelize-version: [5, latest]
name: MariaDB (Node ${{ matrix.node-version }}, Sequelize ${{ matrix.sequelize-version }})
runs-on: ubuntu-latest
env:
DIALECT: mariadb
SEQ_PORT: 33060
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- run: yarn install --frozen-lockfile --ignore-engines
- run: yarn add sequelize@${{ matrix.sequelize-version }} --ignore-engines
- run: docker-compose up -d ${DIALECT}
- run: docker run --link ${DIALECT}:db -e CHECK_PORT=${SEQ_PORT::-1} -e CHECK_HOST=db --net cli_default giorgos/takis
- run: yarn test
test-sqlite:
strategy:
fail-fast: false
matrix:
node-version: [10, 16]
sequelize-version: [5, latest]
name: SQLite (Node ${{ matrix.node-version }}, Sequelize ${{ matrix.sequelize-version }})
runs-on: ubuntu-latest
env:
DIALECT: sqlite
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- run: yarn install --frozen-lockfile --ignore-engines
- run: yarn add sequelize@${{ matrix.sequelize-version }} --ignore-engines
- run: yarn test
release:
name: Release
runs-on: ubuntu-latest
needs:
[
test-sqlite,
test-postgres,
test-mysql
]
if: github.event_name == 'push' && (github.ref == 'refs/heads/v6' || github.ref == 'refs/heads/v7')
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: 18.x
- run: yarn install --frozen-lockfile
- run: npx semantic-release
- id: sequelize
uses: sdepold/github-action-get-latest-release@master
with:
repository: sequelize/cli
- run: |
curl -XPOST -u "sdepold:${{ secrets.GH_TOKEN }}" -H "Accept: application/vnd.github.v3+json" -H "Content-Type: application/json" https://api.github.com/repos/sequelize/cli/dispatches --data '{"event_type":"Release notifier","client_payload":{"release-id": ${{ steps.sequelize.outputs.id }}}}'