-
Notifications
You must be signed in to change notification settings - Fork 6
chore(ci): update coverage workflow to use coveralls #110
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Orkuncakilkaya
wants to merge
10
commits into
main
Choose a base branch
from
implement-coveralls
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
e34f35a
chore(ci): update coverage workflow to use coveralls
Orkuncakilkaya baf276e
refactor: set package manager version
Orkuncakilkaya 3c0ad8a
refactor: use pnpm@9 to support older angular versions
Orkuncakilkaya ee6aadb
chore(ci): standardize step names in coverage workflow
Orkuncakilkaya 6b5a152
chore(ci): specify ubuntu-latest for coverage workflow
Orkuncakilkaya 93df666
test: add unit tests for server-specific behavior and public API exports
Orkuncakilkaya da8f336
chore: use required inputs for coveralls workflow
Orkuncakilkaya 4aa10e8
chore: honor CI pnpm install step
Orkuncakilkaya 25953be
chore(ci): update permissions for coverage workflow
Orkuncakilkaya f13658e
chore: remove unnecessary allowBuilds configuration in pnpm-workspace…
Orkuncakilkaya File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -84,9 +84,9 @@ | |
| "projects/*" | ||
| ], | ||
| "pnpm": { | ||
| "onlyBuiltDependencies": ["@parcel/watcher", "esbuild", "lmdb", "msgpackr-extract"], | ||
| "overrides": { | ||
| "rxjs": "~7.8.0" | ||
| } | ||
| } | ||
| }, | ||
| "packageManager": "pnpm@9.15.9+sha512.68046141893c66fad01c079231128e9afb89ef87e2691d69e4d40eee228988295fd4682181bae55b58418c3a253bde65a505ec7c5f9403ece5cc3cd37dcf2531" | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: let's migrate to pnpm 11 (can be done in a separate PR) |
||
| } | ||
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,2 +1,2 @@ | ||
| packages: | ||
| - 'projects/*' | ||
| - 'projects/*' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -38,4 +38,4 @@ | |
| "@fingerprint/agent": "^4.0.0", | ||
| "tslib": "^2.5.0" | ||
| } | ||
| } | ||
| } | ||
27 changes: 27 additions & 0 deletions
27
projects/fingerprintjs-pro-angular/src/lib/fingerprint.service.server.spec.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| import { TestBed } from '@angular/core/testing' | ||
| import { FingerprintService } from './fingerprint.service' | ||
| import { PLATFORM_ID } from '@angular/core' | ||
| import { FINGERPRINT_ANGULAR_SETTINGS_TOKEN } from './tokens/fingerprint-angular-settings-token' | ||
|
|
||
| describe('FingerprintService (Server)', () => { | ||
| let service: FingerprintService | ||
|
|
||
| beforeEach(() => { | ||
| TestBed.configureTestingModule({ | ||
| providers: [ | ||
| FingerprintService, | ||
| { provide: PLATFORM_ID, useValue: 'server' }, | ||
| { provide: FINGERPRINT_ANGULAR_SETTINGS_TOKEN, useValue: { startOptions: { apiKey: 'test' } } }, | ||
| ], | ||
| }) | ||
| service = TestBed.inject(FingerprintService) | ||
| }) | ||
|
|
||
| it('should reject getVisitorData on non-browser platform', async () => { | ||
| await expect(service.getVisitorData()).rejects.toThrow('Fingerprint agent is not initialized on this platform') | ||
| }) | ||
|
|
||
| it('should reject collectData on non-browser platform', async () => { | ||
| await expect(service.collectData()).rejects.toThrow('Fingerprint agent is not initialized on this platform') | ||
| }) | ||
| }) |
12 changes: 12 additions & 0 deletions
12
projects/fingerprintjs-pro-angular/src/lib/tokens/fingerprint-angular-settings-token.spec.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| import { TestBed } from '@angular/core/testing' | ||
| import { FINGERPRINT_ANGULAR_SETTINGS_TOKEN } from './fingerprint-angular-settings-token' | ||
|
|
||
| describe('FINGERPRINT_ANGULAR_SETTINGS_TOKEN', () => { | ||
| it('should have a default value', () => { | ||
| TestBed.configureTestingModule({ | ||
| providers: [], | ||
| }) | ||
| const settings = TestBed.inject(FINGERPRINT_ANGULAR_SETTINGS_TOKEN) | ||
| expect(settings).toEqual({ startOptions: { apiKey: '' } }) | ||
| }) | ||
| }) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| import * as publicApi from './public-api' | ||
| import { FingerprintService } from './lib/fingerprint.service' | ||
| import { FingerprintModule } from './lib/fingerprint.module' | ||
| import { provideFingerprint } from './lib/fingerprint.providers' | ||
| import { FINGERPRINT_ANGULAR_SETTINGS_TOKEN } from './lib/tokens/fingerprint-angular-settings-token' | ||
|
|
||
| describe('public-api', () => { | ||
| it('should export the expected symbols', () => { | ||
| expect(publicApi.FingerprintService).toBe(FingerprintService) | ||
| expect(publicApi.FingerprintModule).toBe(FingerprintModule) | ||
| expect(publicApi.provideFingerprint).toBe(provideFingerprint) | ||
| expect(publicApi.FINGERPRINT_ANGULAR_SETTINGS_TOKEN).toBe(FINGERPRINT_ANGULAR_SETTINGS_TOKEN) | ||
| expect(publicApi.Fingerprint).toBeDefined() | ||
| }) | ||
| }) |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.