Skip to content

Commit

Permalink
Merge pull request #3 from whisthub/feature/fix-npm-publish
Browse files Browse the repository at this point in the history
fix: build not running before publish
  • Loading branch information
sebamarynissen authored Jan 31, 2024
2 parents 8d3deb9 + a3cf79e commit 3ec70e3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ jobs:
- run: npm version ${TAG_NAME} --git-tag-version=false
env:
TAG_NAME: ${{ github.event.release.tag_name }}

- name: Build
run: npm run build

- run: npm whoami; npm --ignore-scripts publish --provenance --access public
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
2 changes: 1 addition & 1 deletion test/job.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ describe('Job', () => {
const job2 = new Job(agenda, { name: 'demo', type: 'normal' });
const now = new Date().valueOf();
job2.repeatEvery('3 minutes', { skipImmediate: true });
expect(job2.attrs.nextRunAt).to.be.within(new Date(now + 180000), new Date(now + 180002)); // Inclusive
expect(job2.attrs.nextRunAt).to.be.within(new Date(now + 180000 - 2), new Date(now + 180002)); // Inclusive
});
it('repeats from the existing nextRunAt property with skipImmediate', () => {
const job2 = new Job(agenda, { name: 'demo', type: 'normal' });
Expand Down

0 comments on commit 3ec70e3

Please sign in to comment.