Skip to content

Commit

Permalink
Add test workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Alphka committed Jul 31, 2023
1 parent a76c6a6 commit b8ec22e
Show file tree
Hide file tree
Showing 5 changed files with 66 additions and 3 deletions.
4 changes: 4 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,7 @@ end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.yml]
indent_size = 2
indent_style = space
35 changes: 35 additions & 0 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Node.js CI

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

jobs:
build:
runs-on: ${{ matrix.os }}

strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
node-version: [16.x, 18.x, 20.x]

steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: "npm"
- name: Install dependencies
run: npm ci --fund=false
- name: Type checking
run: npx tsc -p jsconfig.json
- name: Test project
run: npm test
env:
TOKEN: ${{ secrets.TOKEN }}
USER_ID: ${{ secrets.USERID }}
SESSION_ID: ${{ secrets.SESSIONID }}
3 changes: 2 additions & 1 deletion jsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
"typeRoots": [
"node_modules/@types",
"src/typings"
]
],
"noEmit": true
},
"exclude": [
"node_modules",
Expand Down
20 changes: 19 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 6 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,15 @@
"devDependencies": {
"@types/mime": "^3.0.1",
"@types/node": "^20.4.5",
"@types/sharp": "^0.31.1"
"@types/sharp": "^0.31.1",
"typescript": "^5.1.6"
},
"bin": {
"instadl": "src/index.js"
},
"engines": {
"npm": ">=8",
"node": ">=16"
},
"type": "module"
}

0 comments on commit b8ec22e

Please sign in to comment.