wip: trying different things
This commit is contained in:
@@ -20,7 +20,6 @@ jobs:
|
||||
env:
|
||||
CI: true
|
||||
NODE_OPTIONS: --max-old-space-size=4096
|
||||
BACKSTAGE_E2E_CLI_TEST: true
|
||||
|
||||
name: Node ${{ matrix.node-version }} on ${{ matrix.os }}
|
||||
steps:
|
||||
@@ -45,18 +44,22 @@ jobs:
|
||||
# generate temp directory
|
||||
- name: generate tempdir
|
||||
id: generate_tempdir
|
||||
run: echo ::set-output name=tempdir::$(node scripts/generateTempDir.js)
|
||||
run: echo "::set-output name=tempdir::$(node scripts/generateTempDir.js)"
|
||||
# This creates a new app and plugin which pollutes the workspace, so it should be run last.
|
||||
- name: verify app and plugin creation on Windows
|
||||
working-directory: ${{ steps.generate_tempdir.outputs.tempdir }}
|
||||
if: runner.os == 'Windows'
|
||||
run: node ${{ github.workspace }}/scripts/cli-e2e-test.js
|
||||
env:
|
||||
BACKSTAGE_E2E_CLI_TEST: true
|
||||
- name: verify app and plugin creation on Linux
|
||||
working-directory: ${{ steps.generate_tempdir.outputs.tempdir }}
|
||||
if: runner.os == 'Linux'
|
||||
run: |
|
||||
sudo sysctl fs.inotify.max_user_watches=524288
|
||||
node ${{ github.workspace }}/scripts/cli-e2e-test.js
|
||||
env:
|
||||
BACKSTAGE_E2E_CLI_TEST: true
|
||||
# This should lint and test both an app and a plugin
|
||||
- name: yarn lint, test after creation
|
||||
working-directory: ${{ steps.generate_tempdir.outputs.tempdir }}
|
||||
@@ -64,3 +67,5 @@ jobs:
|
||||
cd test-app
|
||||
yarn lint:all
|
||||
yarn test:all
|
||||
env:
|
||||
BACKSTAGE_E2E_CLI_TEST: true
|
||||
|
||||
@@ -20,10 +20,7 @@ const path = require('path');
|
||||
// Figure out whether we're running inside the backstage repo or as an installed dependency
|
||||
const isLocal = require('fs').existsSync(path.resolve(__dirname, '../src'));
|
||||
|
||||
// This is used for e2e-tests where we create a new app in a tmp folder
|
||||
const isTemp = path.resolve(__dirname).includes(require('os').tmpdir());
|
||||
|
||||
if (!isLocal || isTemp || process.env.BACKSTAGE_E2E_CLI_TEST) {
|
||||
if (!isLocal || process.env.BACKSTAGE_E2E_CLI_TEST) {
|
||||
// src-relative imports are a pain to get to work with plain tsc compilation, as the
|
||||
// transpiled code will maintain the imports as they are in the source. Which means an
|
||||
// import for `helpers/paths` will start like that in the output, which won't work in NodeJS.
|
||||
|
||||
Reference in New Issue
Block a user