Skip to content

Commit 5e0d948

Browse files
authored
Merge pull request #399 from fractal-analytics-platform/remove-coverage
Removed coverage setup from Playwright tests and CI
2 parents 49f98bb + e947205 commit 5e0d948

37 files changed

+128
-260
lines changed

.github/workflows/coverage.yaml

Lines changed: 0 additions & 52 deletions
This file was deleted.

.github/workflows/end_to_end_tests.yaml

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
name: End-to-end tests
22

3-
on: [workflow_call]
3+
on:
4+
push:
5+
branches: ['main']
6+
pull_request:
7+
branches: ['main']
48

59
jobs:
610
end_to_end_tests:
@@ -36,12 +40,3 @@ jobs:
3640

3741
- name: Run Playwright tests
3842
run: npx playwright test --workers=1
39-
40-
- uses: actions/upload-artifact@v3
41-
with:
42-
name: playwright-coverage
43-
path: coverage-playwright/
44-
retention-days: 30
45-
46-
env:
47-
ENABLE_COVERAGE: "true"

.github/workflows/unit_tests.yaml

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
name: Unit tests
22

3-
on: [workflow_call]
3+
on:
4+
push:
5+
branches: ['main']
6+
pull_request:
7+
branches: ['main']
48

59
jobs:
610
unit_tests:
@@ -26,13 +30,4 @@ jobs:
2630
run: npm install
2731

2832
- name: Run vitest tests
29-
run: npx vitest run --coverage.enabled --coverage.provider=istanbul --coverage.include=src --coverage.reporter=json --coverage.all
30-
31-
- uses: actions/upload-artifact@v3
32-
with:
33-
name: unit-coverage
34-
path: coverage-unit/
35-
retention-days: 30
36-
37-
env:
38-
ENABLE_COVERAGE: "true"
33+
run: npx vitest run

.nycrc

Lines changed: 0 additions & 3 deletions
This file was deleted.

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
*Note: Numbers like (\#123) point to closed Pull Requests on the fractal-web repository.*
22

3+
# Unreleased
4+
5+
* Removed coverage setup from Playwright tests and CI (\#399).
6+
37
# 0.8.2
48

59
* Improvements on worflow task form (\#393):

docs/development/release.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
Steps to release a new `fractal-web` version:
44

55
* Update `CHANGELOG.md` on `main` branch, replacing the "Unreleased" temporary title with the desidered version number
6+
* Update the `version-compatibility.md` doc page
7+
* Commit the changes
68
* Execute `npm version <major|minor|patch>`
79
* Execute `git push origin main`
810
* Execute `git push origin <new-version-tag>`

docs/development/tests.md

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -18,24 +18,15 @@ To execute the tests seeing the browser add the `--headed` flag or the `--debug`
1818

1919
## Coverage
2020

21+
> Warning: code coverage results are not reliable at the moment
22+
2123
Coverage for the unit tests:
2224

2325
```
24-
ENABLE_COVERAGE=true npx vitest run --coverage.enabled --coverage.provider=istanbul --coverage.include=src --coverage.reporter=json --coverage.all
26+
npx vitest --coverage
2527
```
2628

27-
Warning: coverage takes some time using the option `--coverage.all`.
28-
29-
Coverage for the playwright tests is automatically collected when running `ENABLE_COVERAGE=true npx playwright test`.
30-
31-
To generate a merged html report:
32-
33-
```
34-
mkdir coverage-all
35-
cp coverage-playwright/* coverage-all
36-
cp coverage-unit/* coverage-all
37-
npx nyc report --report-dir ./coverage-html --temp-dir ./coverage-all --reporter=html --exclude-after-remap false
38-
```
29+
Warning: coverage takes some time, since we are using the option `{ all: true }`.
3930

4031
### Local `fractal-server` instance
4132

docs/version-compatibility.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,6 @@ The following table shows which `fractal-server` versions are compatible with wh
44

55
| fractal-web | fractal-server |
66
|-------------|----------------|
7-
| 0.8.0 | 1.4.2 |
7+
| 0.8.2 | 1.4.2 |
88
| 0.8.1 | 1.4.2 |
9+
| 0.8.0 | 1.4.2 |

playwright.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ export default defineConfig({
3939

4040
webServer: [
4141
{
42-
command: './tests/start-test-server.sh 1.4.2a5',
42+
command: './tests/start-test-server.sh 1.4.2',
4343
port: 8000,
4444
waitForPort: true,
4545
stdout: 'pipe',

src/lib/common/errors.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,14 @@ export async function responseError(response) {
1414
* Used for example to handle the displaying of the error alert when using the ConfirmActionButton.
1515
*/
1616
export class AlertError extends Error {
17-
/** @type {null | { loc: string[], msg: string } | string} */
18-
simpleValidationMessage;
19-
2017
/**
2118
* @param {any} reason
2219
* @param {number|null} statusCode
2320
*/
2421
constructor(reason, statusCode = null) {
2522
super();
2623
this.reason = reason;
24+
/** @type {null | { loc: string[], msg: string } | string} */
2725
this.simpleValidationMessage = getSimpleValidationMessage(reason, statusCode);
2826
}
2927

0 commit comments

Comments
 (0)