-
-
Notifications
You must be signed in to change notification settings - Fork 525
96 lines (95 loc) · 3.2 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
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@v3
- 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@v3
- 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@v3
- 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@v3
- 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 }}}}'