Skip to content

Commit

Permalink
build improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
mifi committed Dec 8, 2020
1 parent cb683b8 commit 7194628
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 7 deletions.
8 changes: 7 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,18 @@ jobs:
test:
runs-on: ubuntu-latest

strategy:
matrix:
node: ['10', '12', '14']

steps:
- uses: actions/checkout@v2

- uses: actions/setup-node@v1
with:
node-version: 14
node-version: ${{ matrix.node }}

- run: yarn
- run: npm run lint
- run: npm test
- run: npm run coveralls
8 changes: 4 additions & 4 deletions compile-zones.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ Object.keys(zones.zones).forEach((z) => {
out[z] = zones.zones[z].ics.join('\r\n');
});

Object.keys(zones.aliases).forEach((z) => {
const aliasTo = zones.aliases[z].aliasTo;
Object.keys(zones.aliases).forEach((alias) => {
const aliasTo = zones.aliases[alias].aliasTo;
if (zones.zones[aliasTo]) {
out[z] = zones.zones[aliasTo].ics.join('\r\n');
out[alias] = zones.zones[aliasTo].ics.join('\r\n');
} else {
console.warn(`${aliasTo} (${z}) not found, skipping`);
console.warn(`${aliasTo} (${alias}) not found, skipping`);
}
});

Expand Down
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@
"description": "ICS / iCal / iCalendar parser / expander",
"main": "index.js",
"scripts": {
"test": "env TZ=Etc/UTC mocha && eslint .",
"coveralls": "istanbul cover _mocha && istanbul-coveralls"
"lint": "eslint .",
"test": "env TZ=Etc/UTC mocha",
"coveralls": "istanbul cover _mocha && istanbul-coveralls",
"update-zones": "wget -O zones.json https://hg.mozilla.org/comm-central/raw-file/tip/calendar/timezones/zones.json && node compile-zones.js"
},
"repository": {
"type": "git",
Expand Down

0 comments on commit 7194628

Please sign in to comment.