diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 8662045b..e0cd371d 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -2,22 +2,41 @@ name: CI on: [push] +env: + UNFURL_BRANCH: standalone-gui-naive-reload + + GCP_DNS_ZONE: deploythis.io + AWS_DNS_ZONE: opencloudservices.net + + MAIL_USERNAME: admin@mailu.untrusted.me + MAIL_PASSWORD: ocPC2cnGkQsz35I + SMTP_HOST: mailu.untrusted.me + + AWS_ACCESS_KEY_ID: foobarbaz + AWS_SECRET_ACCESS_KEY: asldfjkasldkjalqweioptuqpeortiu + AWS_DEFAULT_REGION: eu-central-1 + + ARM_CLIENT_ID: 2b03ea39-628d-4443-96ec-535bc8b374eb + ARM_TENANT_ID: 1211e508-10ae-48e9-9591-74b82d108762 + ARM_SUBSCRIPTION_ID: 2a4d88e0-165e-422b-bb41-aa4f1461e581 + ARM_CLIENT_SECRET: asldfjkasldkjalqweioptuqpeortiu + AZURE_RESOURCE_GROUP: example-resources + AZURE_SUBNET: default + AZURE_VIRTUAL_NETWORK: example-network + + GOOGLE_APPLICATION_CREDENTIALS: testing-shared/fixtures/service-account.json + + DIGITALOCEAN_TOKEN: asldfjkasldkjalqweioptuqpeortiu + + FAIL_FAST_ENABLED: true + CY_COMMAND_TIMEOUT: 30000 + TEST_VERSIONS: v2 + UNFURL_TEST_TMPDIR: tmp + jobs: build: name: Test & Build runs-on: ubuntu-latest - env: - UNFURL_BRANCH: standalone-gui - AWS_DNS_ZONE: opencloudservices.net - AWS_ACCESS_KEY_ID: foobarbaz - AWS_SECRET_ACCESS_KEY: asldfjkasldkjalqweioptuqpeortiu - AWS_DEFAULT_REGION: eu-central-1 - MAIL_USERNAME: admin@mailu.untrusted.me - MAIL_PASSWORD: ocPC2cnGkQsz35I - SMTP_HOST: mailu.untrusted.me - CY_COMMAND_TIMEOUT: 30000 - TEST_VERSIONS: v2 - UNFURL_TEST_TMPDIR: tmp steps: - uses: actions/checkout@v3 - uses: actions/setup-node@v3 @@ -55,8 +74,7 @@ jobs: - name: Create release artifacts if: startsWith(github.ref, 'refs/tags/') run: tar -czvf unfurl-gui-dist.tar.gz dist - - name: Upload release artifact - if: startsWith(github.ref, 'refs/tags/') + - name: Upload dist uses: actions/upload-artifact@v2 with: name: unfurl-gui-dist @@ -77,3 +95,83 @@ jobs: uses: softprops/action-gh-release@v2 with: files: unfurl-gui-dist.tar.gz + +# TODO some yaml merging or smth (GitHub doesn't support yaml anchors) +# This could leverage .gitlab/ci-tests.yaml and have automated documentation + dryrun_a: + name: Dryrun A + needs: build + env: + SPEC_GLOBS: aws* az* + SPEC_SKIP_GLOBS: '*container-webapp* *nestedcloud* *draft aws__baserow*' # we already ran baserow + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: 16 + - name: Install yarn dependencies + run: npm i -g yarn && YARN_ENABLE_IMMUTABLE_INSTALLS=false yarn install + - name: Compile # TODO just extract the artifact from previous step + run: yarn build + - name: Install unfurl + run: git clone --recurse-submodules --branch $UNFURL_BRANCH --single-branch --depth 1 https://github.com/onecommons/unfurl $HOME/unfurl; pip install -e $HOME/unfurl + - name: Integration test + run: yarn integration-test run --namespace onecommons/blueprints -- -e GENERATE_SUBDOMAINS=true --browser chrome + - name: Upload Cypress screenshots + if: ${{ failure() }} + uses: actions/upload-artifact@v2 + with: + name: dryrunA-cypress-screenshots + path: cypress/screenshots + - name: Upload dashboard + if: ${{ failure() }} + uses: actions/upload-artifact@v2 + with: + name: dryrunA-dashboard + path: ${{ env.UNFURL_TEST_TMPDIR }}/ufsv + - name: Upload unfurl server log + if: ${{ always() }} + uses: actions/upload-artifact@v2 + with: + name: dryrunA-unfurl-server-log + path: ${{ env.UNFURL_TEST_TMPDIR }}/unfurl.log + + dryrun_b: + name: Dryrun B + needs: build + env: + SPEC_GLOBS: gcp* do* + SPEC_SKIP_GLOBS: '*container-webapp* *nestedcloud* *draft aws__baserow*' # we already ran baserow + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: 16 + - name: Install yarn dependencies + run: npm i -g yarn && YARN_ENABLE_IMMUTABLE_INSTALLS=false yarn install + - name: Compile # TODO just extract the artifact from previous step + run: yarn build + - name: Install unfurl + run: git clone --recurse-submodules --branch $UNFURL_BRANCH --single-branch --depth 1 https://github.com/onecommons/unfurl $HOME/unfurl; pip install -e $HOME/unfurl + - name: Integration test + run: yarn integration-test run --namespace onecommons/blueprints -- -e GENERATE_SUBDOMAINS=true --browser chrome + - name: Upload Cypress screenshots + if: ${{ failure() }} + uses: actions/upload-artifact@v2 + with: + name: dryrunB-cypress-screenshots + path: cypress/screenshots + - name: Upload dashboard + if: ${{ failure() }} + uses: actions/upload-artifact@v2 + with: + name: dryrunB-dashboard + path: ${{ env.UNFURL_TEST_TMPDIR }}/ufsv + - name: Upload unfurl server log + if: ${{ always() }} + uses: actions/upload-artifact@v2 + with: + name: dryrunB-unfurl-server-log + path: ${{ env.UNFURL_TEST_TMPDIR }}/unfurl.log diff --git a/cypress/plugins/index.js b/cypress/plugins/index.js index 7bd9cbeb..77be7ce4 100644 --- a/cypress/plugins/index.js +++ b/cypress/plugins/index.js @@ -31,6 +31,8 @@ module.exports = (on, config) => { // config.env.ELECTRON_EXTRA_LAUNCH_ARGS = '--js-flags="--expose-gc"' + require('cypress-fail-fast/plugin')(on, config) + const OC_URL = config.env.OC_URL = config.env.OC_URL || 'http://localhost:8080' config.env.OC_GRAPHQL_ENDPOINT = (function(baseUrl){ const url = new URL(baseUrl) @@ -84,7 +86,6 @@ module.exports = (on, config) => { if (typeof TEARDOWN == 'string') TEARDOWN = TEARDOWN.toLowerCase() if (typeof GENERATE_SUBDOMAINS == 'string') GENERATE_SUBDOMAINS = GENERATE_SUBDOMAINS.toLowerCase() - console.log({TEARDOWN, GENERATE_SUBDOMAINS, INTEGRATION_TEST_ARGS}) // default true config.env.TEARDOWN = !['0', 'false', 'no', false].includes(TEARDOWN) // default false diff --git a/cypress/support/create-aws-environment.js b/cypress/support/create-aws-environment.js index 727ee0d3..c03f44cb 100644 --- a/cypress/support/create-aws-environment.js +++ b/cypress/support/create-aws-environment.js @@ -69,6 +69,8 @@ Cypress.Commands.add('createAWSEnvironment', (options) => { options ) + let environmentCreated + cy.whenEnvironmentAbsent(environmentName, () => { cy.visit(`/${DASHBOARD_DEST}/-/environments`) createEnvironmentButton().click() @@ -77,12 +79,13 @@ Cypress.Commands.add('createAWSEnvironment', (options) => { cy.awsAuthenticateEnvironment({region: AWS_DEFAULT_REGION}) cy.contains(environmentName).should('exist') cy.contains('Amazon Web Services').should('exist') + environmentCreated = true }) // create external resource if (shouldCreateExternalResource) { cy.whenInstancesAbsent(environmentName, () => { - cy.visit(`/${DASHBOARD_DEST}/-/environments/${environmentName}`) + environmentCreated || cy.visit(`/${DASHBOARD_DEST}/-/environments/${environmentName}`) if(shouldCreateDNS) { cy.uncheckedCreateDNS(AWS_DNS_TYPE, AWS_DNS_ZONE) } diff --git a/cypress/support/create-az-environment.js b/cypress/support/create-az-environment.js index c4890f3b..9e5cfa84 100644 --- a/cypress/support/create-az-environment.js +++ b/cypress/support/create-az-environment.js @@ -49,6 +49,8 @@ Cypress.Commands.add('createAzEnvironment', (options) => { options ) + let environmentCreated + cy.whenEnvironmentAbsent(environmentName, () => { cy.visit(`/${DASHBOARD_DEST}/-/environments`) createEnvironmentButton().click() @@ -74,14 +76,16 @@ Cypress.Commands.add('createAzEnvironment', (options) => { cy.contains('button', 'Save Changes').click() }) + environmentCreated = true cy.wait(5000) }) - cy.contains('a', 'Resources').click() // create external resource if (shouldCreateExternalResource) { cy.whenInstancesAbsent(environmentName, () => { + environmentCreated || cy.visit(`/${DASHBOARD_DEST}/-/environments/${environmentName}`) + cy.contains('a', 'Resources').click() if(shouldCreateDNS) { cy.uncheckedCreateDNS(AWS_DNS_TYPE, AWS_DNS_ZONE) } diff --git a/cypress/support/create-digitalocean-environment.js b/cypress/support/create-digitalocean-environment.js index d4a97e26..ae9c92ef 100644 --- a/cypress/support/create-digitalocean-environment.js +++ b/cypress/support/create-digitalocean-environment.js @@ -42,6 +42,8 @@ Cypress.Commands.add('createDigitalOceanEnvironment', (options) => { options ) + let environmentCreated + cy.whenEnvironmentAbsent(environmentName, () => { cy.visit(`/${DASHBOARD_DEST}/-/environments`) createEnvironmentButton().click() @@ -64,14 +66,16 @@ Cypress.Commands.add('createDigitalOceanEnvironment', (options) => { cy.contains('button', 'Save Changes').click() }) + environmentCreated = true cy.wait(5000) }) - cy.contains('a', 'Resources').click() // create external resource if (shouldCreateExternalResource) { cy.whenInstancesAbsent(environmentName, () => { + environmentCreated || cy.visit(`/${DASHBOARD_DEST}/-/environments/${environmentName}`) + cy.contains('a', 'Resources').click() if(shouldCreateDNS) { cy.uncheckedCreateDNS(AWS_DNS_TYPE, AWS_DNS_ZONE) } diff --git a/cypress/support/create-gcp-environment.js b/cypress/support/create-gcp-environment.js index 5d4abf44..6de1f153 100644 --- a/cypress/support/create-gcp-environment.js +++ b/cypress/support/create-gcp-environment.js @@ -7,6 +7,8 @@ const USERNAME = Cypress.env('OC_IMPERSONATE') const DASHBOARD_DEST = Cypress.env('DASHBOARD_DEST') function createGCPEnvironment({environmentName, shouldCreateExternalResource, shouldCreateDNS}) { + let environmentCreated + cy.whenEnvironmentAbsent(environmentName, () => { cy.visit(`/${DASHBOARD_DEST}/-/environments`) cy.clickCreateEnvironmentButton() @@ -15,11 +17,13 @@ function createGCPEnvironment({environmentName, shouldCreateExternalResource, sh authenticateGCP() validateGCPEnvironment() + environmentCreated = true }) // create external resource if (shouldCreateExternalResource) { cy.whenInstancesAbsent(environmentName, () => { + environmentCreated || cy.visit(`/${DASHBOARD_DEST}/-/environments/${environmentName}`) if(shouldCreateDNS) { cy.uncheckedCreateDNS(GCP_DNS_TYPE, GCP_DNS_ZONE) } diff --git a/cypress/support/create-kubernetes-environment.js b/cypress/support/create-kubernetes-environment.js index 3d797f71..bb9eea84 100644 --- a/cypress/support/create-kubernetes-environment.js +++ b/cypress/support/create-kubernetes-environment.js @@ -94,6 +94,8 @@ Cypress.Commands.add('createK8SEnvironment', (options) => { options ) + let environmentCreated + cy.whenEnvironmentAbsent(environmentName, () => { cy.visit(`/${DASHBOARD_DEST}/-/environments`) createEnvironmentButton().click() @@ -127,14 +129,16 @@ Cypress.Commands.add('createK8SEnvironment', (options) => { cy.get('#ci-variable-type').select('File') cy.get('[data-qa-selector="ci_variable_save_button"]').click() } - cy.contains('a', 'Resources').click() - addK8sAnnotations() + + environmentCreated = true }) // create external resource if (shouldCreateExternalResource) { cy.whenInstancesAbsent(environmentName, () => { + environmentCreated || cy.visit(`/${DASHBOARD_DEST}/-/environments/${environmentName}`) + cy.contains('a', 'Resources').click() if(shouldCreateDNS) { cy.uncheckedCreateDNS(AWS_DNS_TYPE, AWS_DNS_ZONE) } diff --git a/cypress/support/e2e.js b/cypress/support/e2e.js index 49f6936c..c4ffcaa8 100644 --- a/cypress/support/e2e.js +++ b/cypress/support/e2e.js @@ -14,6 +14,7 @@ // *********************************************************** // Import commands.js using ES2015 syntax: +import 'cypress-fail-fast' import './commands' const USERNAME = Cypress.env('OC_USERNAME') diff --git a/cypress/support/run-recreate-deployment.js b/cypress/support/run-recreate-deployment.js index 2fac54d0..3f567cd3 100644 --- a/cypress/support/run-recreate-deployment.js +++ b/cypress/support/run-recreate-deployment.js @@ -345,10 +345,10 @@ Cypress.Commands.add('recreateDeployment', options => { const deploymentDir = store.getters.lookupDeployPath(deployment.name, deployment._environment)?.name expect(deploymentDir).to.exist - cy.execLoud( - `./testing-shared/run-unfurl.sh deploy --dryrun --use-environment ${deployment._environment} --approve --jobexitcode error ${deploymentDir}`, - { timeout: BASE_TIMEOUT * 10 } - ) + cy.execLoud(`./testing-shared/run-unfurl.sh deploy --dryrun --use-environment ${deployment._environment} --approve --jobexitcode error ${deploymentDir}`, { + timeout: BASE_TIMEOUT * 100, // unfurl isn't known to hang, so we can wait a long time + failOnNonZeroExit: false // we'll fail later when we check the status - this is better for the log + }) }) cy.reload() diff --git a/package.json b/package.json index 76b757b2..0ed2f097 100644 --- a/package.json +++ b/package.json @@ -84,6 +84,7 @@ "babel-jest": "^29.6.0", "babel-plugin-transform-es2015-modules-commonjs": "^6.26.2", "cypress": "11.2.0", + "cypress-fail-fast": "^7.1.0", "cypress-file-upload": "^5.0.8", "cypress-wait-until": "^1.7.2", "eslint": "^7.2.0", diff --git a/scripts/src/forwarded-variables.json b/scripts/src/forwarded-variables.json index 4fd662d8..63194638 100644 --- a/scripts/src/forwarded-variables.json +++ b/scripts/src/forwarded-variables.json @@ -67,5 +67,6 @@ "KUBECONFIG", "SKIP_NESTEDCLOUD", "DASHBOARD_DEST", - "UNFURL_CMD" + "UNFURL_CMD", + "FAIL_FAST_ENABLED" ] \ No newline at end of file diff --git a/scripts/src/integration-test.js b/scripts/src/integration-test.js index 9606ab5d..ccaf2728 100755 --- a/scripts/src/integration-test.js +++ b/scripts/src/integration-test.js @@ -21,6 +21,14 @@ if(STANDALONE_UNFURL && ! PORT) { PORT = new URL(OC_URL).port } +process.env.FAIL_FAST_ENABLED = process.env.FAIL_FAST_ENABLED || 'false' + +if(STANDALONE_UNFURL) { + // allow some specs to self-filter + process.env.NO_FLAKY = '1' + process.env.DRYRUN = '1' +} + const GENERATED_PASSWORD = !STANDALONE_UNFURL && btoa(Number.MAX_SAFE_INTEGER * Math.random()) const FIXTURES_TMP = path.join(unfurlGuiRoot, 'cypress/fixtures/tmp') @@ -172,7 +180,14 @@ function createDashboardCommand(username, dashboardRepo) { } } -function invokeCypressCommand(baseArgs, forwardedEnv) { +async function invokeCypressCommand(baseArgs, forwardedEnv) { + if(!baseArgs.includes('-s') && baseArgs[0] == 'run') { + process.env.SPEC_GLOBS = process.env.SPEC_GLOBS || '*' + const {getBlueprintSpecs} = (await import('../../testing-shared/fixture-specs.mjs')) + baseArgs.push('-s') + baseArgs.push(getBlueprintSpecs()) + } + const args = ['run', 'cypress', ...baseArgs] const options = {stdio: 'inherit', env: {...process.env, ...forwardedEnv}} return spawnSync.bind(null, 'yarn', args, options) @@ -224,7 +239,7 @@ async function main() { delete forwardedEnv['CYPRESS_OC_IMPERSONATE'] } - const cypressCommand = invokeCypressCommand(args._, forwardedEnv) + const cypressCommand = await invokeCypressCommand(args._, forwardedEnv) if(prepareUserCommand) prepareUserCommand() @@ -271,14 +286,17 @@ async function main() { outfile: `${UNFURL_TEST_TMPDIR}/unfurl.log` }) + unfurlServer.process.on('exit', () => { + console.error('Unfurl server exited early') + process.exit(1) + }) + await unfurlServer.waitUntilReady() } const cypressResult = cypressCommand() console.log(cypressResult) const status = cypressResult.status - if(status) { - process.exit(status) - } + process.exit(status) } async function tryMain() { diff --git a/testing-shared/fixture-specs.mjs b/testing-shared/fixture-specs.mjs new file mode 100644 index 00000000..a54d5b9e --- /dev/null +++ b/testing-shared/fixture-specs.mjs @@ -0,0 +1,31 @@ +const SPEC_GLOBS = process.env.SPEC_GLOBS || '' +const SKIP_GLOBS = process.env.SPEC_SKIP_GLOBS || '*container-webapp* *nestedcloud* *draft*' +const TEST_VERSIONS = process.env.TEST_VERSIONS || 'v2' + +function evalGlobs(globs, prefix, suffix) { + return globs.split(/\s+/).map( + spec => { + const s = `${prefix}${spec}${suffix}` + return globSync(`${prefix}${spec}${suffix}`) + } + ).flat() +} + +import glob from 'glob' +const globSync = glob.sync + + +function fixturesOrSpecsFor(prefix, suffix) { + const includeFixtures = evalGlobs(SPEC_GLOBS, prefix, suffix) + const skipFixtures = evalGlobs(SKIP_GLOBS, prefix, suffix) + + return includeFixtures.filter(f => !skipFixtures.includes(f)) +} + +export function getBlueprintSpecs() { + return fixturesOrSpecsFor('cypress/e2e/blueprints/', '.cy.js') +} + +export function getBlueprintFixtures() { + return fixturesOrSpecsFor(`cypress/fixtures/generated/deployments/${TEST_VERSIONS}/`, '.json') +} diff --git a/testing-shared/fixtures/service-account.json b/testing-shared/fixtures/service-account.json new file mode 100644 index 00000000..6c873887 --- /dev/null +++ b/testing-shared/fixtures/service-account.json @@ -0,0 +1,12 @@ +{ + "type": "service_account", + "project_id": "my-project-id", + "private_key_id": "someprivatekeyid", + "private_key": "-----BEGIN PRIVATE KEY-----\nMIIEvQIBADANBgkqhkiG9w0BAQ...\n-----END PRIVATE KEY-----\n", + "client_email": "my-service-account@my-project-id.iam.gserviceaccount.com", + "client_id": "12345678901234567890", + "auth_uri": "https://accounts.google.com/o/oauth2/auth", + "token_uri": "https://oauth2.googleapis.com/token", + "auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs", + "client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/my-service-account%40my-project-id.iam.gserviceaccount.com" +} \ No newline at end of file diff --git a/testing-shared/run-unfurl.sh b/testing-shared/run-unfurl.sh index a90f3e78..fbbcd391 100755 --- a/testing-shared/run-unfurl.sh +++ b/testing-shared/run-unfurl.sh @@ -1,8 +1,11 @@ #!/bin/bash +# currently only used by cypress due to limitations of cy.exec + cmd=${UNFURL_CMD:-unfurl} -export TF_PLUGIN_CACHE_DIR="$DASHBOARD_DEST/plugincache" -export TF_DATA_DIR="$DASHBOARD_DEST/.terraform" +tfdir=$(dirname $(realpath $DASHBOARD_DEST)) +export TF_PLUGIN_CACHE_DIR="$tfdir/plugincache" +export TF_DATA_DIR="$tfdir/.terraform" export TF_PLUGIN_CACHE_MAY_BREAK_LOCK_FILE="1" export UNFURL_LOGGING='trace' export UNFURL_HOME='' diff --git a/testing-shared/setup.sh b/testing-shared/setup.sh index b682b8d3..1423446b 100755 --- a/testing-shared/setup.sh +++ b/testing-shared/setup.sh @@ -1,23 +1,24 @@ #!/bin/bash if [ -z ${UNFURL_SERVER_CWD+x} ]; then echo UNFURL_SERVER_CWD must be set; exit 1; fi -rm -r $UNFURL_SERVER_CWD/.git* -rm -r $UNFURL_SERVER_CWD/* +rm -rf $UNFURL_SERVER_CWD/.git* +rm -rf $UNFURL_SERVER_CWD/* mkdir -p $UNFURL_SERVER_CWD +local_unfurl_yaml=$(realpath $UFSV_LOCAL) set -e tar -xvf testing-shared/fixtures/dashboards/$TEST_VERSIONS.tgz -C $UNFURL_SERVER_CWD mkdir $UNFURL_SERVER_CWD/local -cp testing-shared/unfurl.yaml $UNFURL_SERVER_CWD/local/ back=$PWD cd $UNFURL_SERVER_CWD git checkout . git remote remove origin || true if [ -n "$UFSV_LOCAL" ] then - mkdir local - cp $UFSV_LOCAL local/unfurl.yaml + cp $local_unfurl_yaml local/unfurl.yaml +else + cp $back/testing-shared/unfurl.yaml local/ fi default_oc_url=https://unfurl.cloud # git remote add origin ${OC_URL:-$default_oc_url}/jest/dashboard diff --git a/ufsv-patch/ufsv-patch.test.mjs b/ufsv-patch/ufsv-patch.test.mjs index 132a5133..a4c8d29f 100644 --- a/ufsv-patch/ufsv-patch.test.mjs +++ b/ufsv-patch/ufsv-patch.test.mjs @@ -7,35 +7,19 @@ import Fixture from './fixture' import {jest} from '@jest/globals' import { sleep } from 'oc_vue_shared/client_utils/misc' import UnfurlServer from '../testing-shared/unfurl-server' +import { getBlueprintFixtures } from '../testing-shared/fixture-specs' // import {globSync} from 'glob' import glob from 'glob' const globSync = glob.sync const TMP_DIR = path.resolve(process.env.UNFURL_TEST_TMPDIR || "/tmp") -const SPEC_GLOBS = process.env.SPEC_GLOBS || '' -const SKIP_GLOBS = process.env.SPEC_SKIP_GLOBS || '*container-webapp* *nestedcloud* *draft*' -const TEST_VERSIONS = process.env.TEST_VERSIONS || 'v2' const UNFURL_CMD = process.env.UNFURL_CMD || 'unfurl' const UNFURL_SERVER_CWD = TMP_DIR + '/ufsv' const OC_URL = process.env.OC_URL || 'https://unfurl.cloud' const PORT = process.env.PORT || '5001' const UNFURL_SERVER_URL = `http://localhost:${PORT}` -const prefix = `cypress/fixtures/generated/deployments/${TEST_VERSIONS}/` -const suffix = '.json' - -function evalGlobs(globs) { - return globs.split(/\s+/).map( - spec => { - const s = `${prefix}${spec}${suffix}` - return globSync(`${prefix}${spec}${suffix}`) - } - ).flat() -} - -const fixtures = evalGlobs(SPEC_GLOBS) -const skipFixtures = evalGlobs(SKIP_GLOBS) // Update .readme/2_jest-ufcloud-emulation.md when changed const UNFURL_DEFAULT_ENV = { @@ -202,8 +186,7 @@ async function runSpecs() { } }) - for(const path of fixtures) { - if(skipFixtures.includes(path)) continue + for(const path of getBlueprintFixtures()) { const fixture = new Fixture(path) test(fixture.name, async () => { await fixture.test(store) diff --git a/yarn.lock b/yarn.lock index f12d7488..6e206034 100644 --- a/yarn.lock +++ b/yarn.lock @@ -9055,6 +9055,17 @@ __metadata: languageName: node linkType: hard +"cypress-fail-fast@npm:^7.1.0": + version: 7.1.0 + resolution: "cypress-fail-fast@npm:7.1.0" + dependencies: + chalk: 4.1.2 + peerDependencies: + cypress: ">=8.0.0" + checksum: 0666d283fc61e015eb99b04047dc9ec796963f50e21acee8e6c0a5ff24fd79cfa54068361ffb05a8c576e71b646b0f86ab4793f91909fcc4ae19a772f113d397 + languageName: node + linkType: hard + "cypress-file-upload@npm:^5.0.8": version: 5.0.8 resolution: "cypress-file-upload@npm:5.0.8" @@ -20555,6 +20566,7 @@ __metadata: bootstrap: 4.6.2 core-js: ^3.37.1 cypress: 11.2.0 + cypress-fail-fast: ^7.1.0 cypress-file-upload: ^5.0.8 cypress-wait-until: ^1.7.2 dompurify: ^2.3.6