Skip to content

Commit

Permalink
add test pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
andresusanto committed May 5, 2024
1 parent 42cda73 commit e9c8e56
Show file tree
Hide file tree
Showing 17 changed files with 7,874 additions and 128 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Pull Request
on:
pull_request:
branches:
- main
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@latest
- uses: actions/setup-node@latest
with:
node-version: 20
cache: "npm"
- run: npm install
- run: npm t -- --coverage
- uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.vscode/
node_modules/
dist/
coverage/
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,7 @@ new EasyDl(url, dest, options);
- `retryDelay` - Delay in ms before attempting a retry. Defaults to `2000`.
- `retryBackoff` - Incremental back-off in ms for each failed retries. Defaults to `3000`.
- `reportInterval` - Set how frequent `progress` event emitted by `EasyDL`. Defaults to `2500`.
- `methodFallback` - use `GET` method instead of `HEAD` to calculate metadata. Useful for downloading S3 signed URLs.

### Metadata

Expand Down
6 changes: 6 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/** @type {import('ts-jest').JestConfigWithTsJest} */
module.exports = {
preset: "ts-jest",
testEnvironment: "node",
coveragePathIgnorePatterns: ["tests"],
};
Loading

0 comments on commit e9c8e56

Please sign in to comment.