Skip to content
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

refactor(models): refine data structure #55

Merged
merged 32 commits into from
Sep 22, 2023
Merged
Show file tree
Hide file tree
Changes from 22 commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
1173d47
refactor(models): replace RunnerOutput
BioPhoton Sep 18, 2023
9c87c44
refactor(models): make execution duration and date as reusable schema
BioPhoton Sep 19, 2023
e5127f0
refactor(models): fix mock data
BioPhoton Sep 19, 2023
307c80f
refactor(models): fix mock data 2
BioPhoton Sep 19, 2023
f4ffb45
refactor(models): make meta info consistent and a reusable schema
BioPhoton Sep 19, 2023
6effb91
refactor(cli): fix mock data
BioPhoton Sep 19, 2023
83df8f8
refactor(cli): fix mock data 3
BioPhoton Sep 19, 2023
69627f9
refactor(cli): fix lint
BioPhoton Sep 19, 2023
c1d3e5f
refactor(cli): fix persist
BioPhoton Sep 19, 2023
28cd0d8
refactor(cli): fix test 2
BioPhoton Sep 19, 2023
09805dd
refactor(cli): fix test 3
BioPhoton Sep 19, 2023
b57b24e
refactor(cli): fix test 4
BioPhoton Sep 19, 2023
cd089a8
refactor(cli): fix test 5
BioPhoton Sep 19, 2023
96efa2d
refactor(cli): fix test 7
BioPhoton Sep 19, 2023
f6b7d17
refactor(cli): fix test 8
BioPhoton Sep 19, 2023
d20113f
ci(workflows): fix missing native nx hashers in pipelines
matejchalk Sep 20, 2023
d0a57d0
build: fix missing '@nx/nx-linux-x64-gnu' optional dependency
matejchalk Sep 20, 2023
ca5ce03
refactor(cli): refactor metaSchema, add metaSchema to CategoryConfig …
BioPhoton Sep 21, 2023
1d2db09
refactor(cli): merge meta info of `PluginConfig#meta` into `PluginCon…
BioPhoton Sep 21, 2023
50cf714
refactor(cli): fix tests for new models
BioPhoton Sep 21, 2023
a6ecbe6
refactor(cli): fix lint
BioPhoton Sep 21, 2023
942084b
refactor(cli): add meta info to `AuditOutput`
BioPhoton Sep 21, 2023
d4bcc89
refactor(models): polish models
BioPhoton Sep 21, 2023
9484315
refactor(models): polish models, mocks and comments
BioPhoton Sep 22, 2023
aa61247
refactor(models): add meta to PluginReport
BioPhoton Sep 22, 2023
cbbfac1
refactor(models): refactor collect logic for new models
BioPhoton Sep 22, 2023
c09d1ad
refactor(models): add categories to report
BioPhoton Sep 22, 2023
92abec4
refactor(models): remove category from report persist logic
BioPhoton Sep 22, 2023
90ad9b8
refactor(models): adopt error handling
BioPhoton Sep 22, 2023
be2bba2
refactor(models): format
BioPhoton Sep 22, 2023
9a28c02
refactor(models): adopt tests
BioPhoton Sep 22, 2023
12cb458
refactor(models): adopt mock data
BioPhoton Sep 22, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ name: CI

on: push

env:
NX_NON_NATIVE_HASHER: true

jobs:
audit:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -74,7 +77,7 @@ jobs:
uses: nrwl/nx-set-shas@v3
- name: Install dependencies
run: npm ci
- name: Test affected projects
- name: Unit test affected projects
run: npx nx affected:test --parallel=3

e2e:
Expand All @@ -94,7 +97,7 @@ jobs:
uses: nrwl/nx-set-shas@v3
- name: Install dependencies
run: npm ci
- name: Test affected projects
- name: E2E test affected projects
run: npx nx affected:e2e --parallel=3

build:
Expand Down
12 changes: 6 additions & 6 deletions examples/cli-e2e/tests/cli.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,21 @@ describe('cli', () => {
it('should load .js config file', async () => {
const argv = await cli(['--configPath', configFile('js'), '--verbose'])
.argv;
expect(argv.plugins[0].meta.slug).toEqual('eslint');
expect(argv.plugins[1].meta.slug).toEqual('lighthouse');
expect(argv.plugins[0].slug).toEqual('eslint');
expect(argv.plugins[1].slug).toEqual('lighthouse');
});

it('should load .mjs config file', async () => {
const argv = await cli(['--configPath', configFile('mjs'), '--verbose'])
.argv;
expect(argv.plugins[0].meta.slug).toEqual('eslint');
expect(argv.plugins[1].meta.slug).toEqual('lighthouse');
expect(argv.plugins[0].slug).toEqual('eslint');
expect(argv.plugins[1].slug).toEqual('lighthouse');
});

it('should load .ts config file', async () => {
const argv = await cli(['--configPath', configFile('ts'), '--verbose'])
.argv;
expect(argv.plugins[0].meta.slug).toEqual('eslint');
expect(argv.plugins[1].meta.slug).toEqual('lighthouse');
expect(argv.plugins[0].slug).toEqual('eslint');
expect(argv.plugins[1].slug).toEqual('lighthouse');
});
});
Loading