Skip to content

Commit

Permalink
Add CI and set timezone to UTC for tests (#265)
Browse files Browse the repository at this point in the history
* Set timezone to UTC for tests

* Add CI
  • Loading branch information
tjenkinson authored Jun 11, 2024
1 parent eb763be commit 7281940
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 3 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Build and Test

on:
push:
pull_request:

permissions:
contents: read

jobs:
run:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
- name: npm install, build and test
run: |
npm ci
npm run build
npm test
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
"main": "./dist/index.js",
"types": "index.d.ts",
"scripts": {
"start": "mocha --require @babel/register --watch --recursive",
"test": "mocha --require @babel/register --recursive",
"start": "TZ=utc mocha --require @babel/register --watch --recursive",
"test": "TZ=utc mocha --require @babel/register --recursive",
"build": "rm -r dist; gulp build"
},
"repository": {
Expand Down
2 changes: 1 addition & 1 deletion test/utils/set-alarm.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ describe('utils.setAlarm', () => {
`DESCRIPTION:Foo`,
`DURATION:P1W15DT3H4M50S`,
`ATTACH;FMTTYPE=audio/basic:ftp://example.com/pub/sounds/bell-01.aud`,
`TRIGGER;VALUE=DATE-TIME:19970217T113000Z`,
`TRIGGER;VALUE=DATE-TIME:19970217T063000Z`,
`SUMMARY:Bar baz`,
`END:VALARM`,
``
Expand Down

0 comments on commit 7281940

Please sign in to comment.