Skip to content

Commit

Permalink
fix: remove sequelize-6-only property
Browse files Browse the repository at this point in the history
  • Loading branch information
mmkal committed Jul 5, 2020
1 parent b6a485e commit ac88d4f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
11 changes: 4 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,12 @@ jobs:
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: npm install
- run: npm install sequelize@${{ matrix.sequelize-version }}
if: matrix.sequelize-version != null
- name: run ci
run: |
npm install
npm run lint
npm run test -- --coverage
env:
CI: true
- run: npm run lint
if: matrix.sequelize-version == null
- run: npm run test -- --coverage
- name: Coverage
uses: codecov/codecov-action@v1
if: matrix.node-version == '12.x' && matrix.sequelize-version == null
7 changes: 6 additions & 1 deletion test/storage/sequelize.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,12 @@ import jetpack = require('fs-jetpack');

// TODO [>=3.0.0]: Investigate whether we are mis-using `model.describe()` here, and get rid of `any`.
// See https://github.com/sequelize/umzug/pull/226 and https://github.com/sequelize/sequelize/issues/12296 for details
const describeModel = (model: any) => model.describe();
const describeModel = (model: any) =>
model.describe().then(d => {
// FIXME [sequelize@>=6] remove this hack when only sequelize>=6 is supported
Object.keys(d).forEach(k => delete d[k].unique);
return d;
});

describe('sequelize', () => {
jetpack.cwd(__dirname).dir('tmp', { empty: true });
Expand Down

0 comments on commit ac88d4f

Please sign in to comment.