Skip to content

Commit

Permalink
Feature/ci (#972)
Browse files Browse the repository at this point in the history
  • Loading branch information
sdepold committed Nov 5, 2021
1 parent d77505c commit 54ec29d
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 5 deletions.
27 changes: 22 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ jobs:
fail-fast: false
matrix:
node-version: [10, 12, 14]
name: Postgres (Node ${{ matrix.node-version }})
sequelize-version: [5, latest]
name: Postgres (Node ${{ matrix.node-version }}, Sequelize ${{ matrix.sequelize-version }})
runs-on: ubuntu-latest
env:
DIALECT: postgres
Expand All @@ -19,7 +20,7 @@ jobs:
with:
node-version: ${{ matrix.node-version }}
- run: npm install
- run: npm install sequelize@latest
- run: npm install sequelize@${{ matrix.sequelize-version }}
- run: npm run build
- 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
Expand All @@ -29,7 +30,8 @@ jobs:
fail-fast: false
matrix:
node-version: [10, 12, 14]
name: MySQL (Node ${{ matrix.node-version }})
sequelize-version: [5, latest]
name: MySQL (Node ${{ matrix.node-version }}, Sequelize ${{ matrix.sequelize-version }})
runs-on: ubuntu-latest
env:
DIALECT: mysql
Expand All @@ -40,7 +42,7 @@ jobs:
with:
node-version: ${{ matrix.node-version }}
- run: npm install
- run: npm install sequelize@latest
- run: npm install sequelize@${{ matrix.sequelize-version }}
- run: npm run build
- 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
Expand All @@ -63,4 +65,19 @@ jobs:
- run: npm install
- run: npm install sequelize@${{ matrix.sequelize-version }}
- run: npm run build
- run: npm run test
- run: npm run test
release:
name: Release
runs-on: ubuntu-latest
needs: [test-sqlite, test-postgres, test-mysql]
if: github.event_name == 'push' && github.ref == 'refs/heads/release'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 12.x
- run: npm install
- run: npx semantic-release
32 changes: 32 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,15 @@
"@babel/core": "^7.10.2",
"@babel/preset-env": "^7.10.2",
"@babel/register": "^7.10.1",
"@commitlint/cli": "^14.1.0",
"@commitlint/config-angular": "^14.1.0",
"bluebird": "^3.7.2",
"eslint": "^7.2.0",
"eslint-config-prettier": "^6.11.0",
"eslint-plugin-prettier": "^3.1.4",
"expect.js": "^0.3.1",
"gulp": "^4.0.0",
"husky": "^7.0.4",
"mocha": "^8.0.0",
"mysql2": "latest",
"pg": "latest",
Expand Down Expand Up @@ -87,5 +90,34 @@
"homepage": "https://github.com/sequelize/cli",
"engines": {
"node": ">=10.0.0"
},
"commitlint": {
"extends": [
"@commitlint/config-angular"
],
"rules": {
"type-enum": [
2,
"always",
[
"build",
"ci",
"docs",
"feat",
"fix",
"perf",
"refactor",
"revert",
"style",
"test",
"meta"
]
]
}
},
"husky": {
"hooks": {
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
}
}
}

0 comments on commit 54ec29d

Please sign in to comment.