mirror of
https://github.com/apache/superset.git
synced 2026-04-20 08:34:37 +00:00
[Build] Collect frontend code coverage from Cypress tests (#9555)
* build: collect code coverage from Cypress Collect frontend code coverage reports from Cypress tests and add proper tagging for all tests. * Fix bash script lint error from shellcheck * Revert Cypress to 4.3.0 to see if it fixes a failing test
This commit is contained in:
28
.github/workflows/caches.js
vendored
28
.github/workflows/caches.js
vendored
@@ -21,6 +21,17 @@
|
||||
const workspaceDirectory = process.env.GITHUB_WORKSPACE;
|
||||
const homeDirectory = process.env.HOME;
|
||||
|
||||
const assetsConfig = {
|
||||
path: [`${workspaceDirectory}/superset/static/assets`],
|
||||
hashFiles: [
|
||||
`${workspaceDirectory}/superset-frontend/src/**/*`,
|
||||
`${workspaceDirectory}/superset-frontend/*.js`,
|
||||
`${workspaceDirectory}/superset-frontend/*.json`,
|
||||
],
|
||||
// dont use restore keys as it may give an invalid older build
|
||||
restoreKeys: '',
|
||||
};
|
||||
|
||||
// Multi-layer cache definition
|
||||
module.exports = {
|
||||
pip: {
|
||||
@@ -31,18 +42,11 @@ module.exports = {
|
||||
path: [`${homeDirectory}/.npm`],
|
||||
hashFiles: ['superset-frontend/package-lock.json'],
|
||||
},
|
||||
assets: {
|
||||
path: [
|
||||
`${workspaceDirectory}/superset/static/assets`,
|
||||
],
|
||||
hashFiles: [
|
||||
`${workspaceDirectory}/superset-frontend/src/**/*`,
|
||||
`${workspaceDirectory}/superset-frontend/*.json`,
|
||||
`${workspaceDirectory}/superset-frontend/*.js`,
|
||||
],
|
||||
// dont use restore keys as it may give an invalid older build
|
||||
restoreKeys: ''
|
||||
},
|
||||
assets: assetsConfig,
|
||||
// use separate cache for instrumented JS files and regular assets
|
||||
// one is built with `npm run build`,
|
||||
// another is built with `npm run build-instrumented`
|
||||
'instrumented-assets': assetsConfig,
|
||||
cypress: {
|
||||
path: [`${homeDirectory}/.cache/Cypress`],
|
||||
hashFiles: [
|
||||
|
||||
Reference in New Issue
Block a user