chore(repo): prepare CI and E2E for better tracking of errors (#6001)
This commit is contained in:
parent
a9945e2946
commit
4f92e608b4
12
.github/workflows/e2e-matrix.yml
vendored
12
.github/workflows/e2e-matrix.yml
vendored
@ -18,6 +18,11 @@ jobs:
|
||||
os:
|
||||
- ubuntu-latest
|
||||
# - windows-latest
|
||||
include:
|
||||
- os: ubuntu-latest
|
||||
os-name: ubuntu
|
||||
# - os: windows-latest
|
||||
# os-name: windows
|
||||
node_version:
|
||||
- '14'
|
||||
# - '15'
|
||||
@ -37,7 +42,7 @@ jobs:
|
||||
- e2e-angular
|
||||
fail-fast: false
|
||||
|
||||
name: ${{ matrix.os }}/node v${{ matrix.node_version }}/${{ matrix.package_manager }} - ${{ matrix.packages }}
|
||||
name: ${{ matrix.os-name }}/n v${{ matrix.node_version }}/${{ matrix.package_manager }} - ${{ matrix.packages }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
@ -60,7 +65,8 @@ jobs:
|
||||
key: ${{ matrix.os }}-node-${{ matrix.node-version }}-yarn-${{ hashFiles('yarn.lock') }}
|
||||
restore-keys: ${{ matrix.os }}-node-${{ matrix.node-version }}-yarn-
|
||||
|
||||
- run: yarn install
|
||||
- name: Install packages
|
||||
run: yarn install --prefer-offline --non-interactive
|
||||
|
||||
- name: Cleanup
|
||||
if: ${{ matrix.os == 'ubuntu-latest' }}
|
||||
@ -71,6 +77,8 @@ jobs:
|
||||
sudo rm -rf /opt/ghc
|
||||
sudo rm -rf "/usr/local/share/boost"
|
||||
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
|
||||
sudo apt-get install lsof
|
||||
echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
|
||||
|
||||
- name: Install PNPM
|
||||
if: ${{ matrix.package_manager == 'pnpm' }}
|
||||
|
||||
@ -109,6 +109,7 @@ export function runCreateWorkspace(
|
||||
cwd: e2eCwd,
|
||||
stdio: [0, 1, 2],
|
||||
env: process.env,
|
||||
encoding: 'utf-8',
|
||||
});
|
||||
return create ? create.toString() : '';
|
||||
}
|
||||
@ -121,6 +122,7 @@ export function packageInstall(pkg: string, projName?: string) {
|
||||
// ...{ stdio: ['pipe', 'pipe', 'pipe'] },
|
||||
...{ stdio: [0, 1, 2] },
|
||||
env: process.env,
|
||||
encoding: 'utf-8',
|
||||
});
|
||||
return install ? install.toString() : '';
|
||||
}
|
||||
@ -132,6 +134,7 @@ export function runNgNew(projectName: string): string {
|
||||
{
|
||||
cwd: e2eCwd,
|
||||
env: process.env,
|
||||
encoding: 'utf-8',
|
||||
}
|
||||
).toString();
|
||||
}
|
||||
@ -254,6 +257,7 @@ export function runCommandAsync(
|
||||
FORCE_COLOR: 'false',
|
||||
NX_INVOKED_BY_RUNNER: undefined,
|
||||
},
|
||||
encoding: 'utf-8',
|
||||
},
|
||||
(err, stdout, stderr) => {
|
||||
if (!opts.silenceError && err) {
|
||||
@ -277,6 +281,7 @@ export function runCommandUntil(
|
||||
FORCE_COLOR: 'false',
|
||||
NX_INVOKED_BY_RUNNER: undefined,
|
||||
},
|
||||
encoding: 'utf-8',
|
||||
});
|
||||
return new Promise((res, rej) => {
|
||||
let output = '';
|
||||
@ -330,6 +335,7 @@ export function runNgAdd(
|
||||
return execSync(`./node_modules/.bin/ng add @nrwl/workspace ${command}`, {
|
||||
cwd: tmpProjPath(),
|
||||
env: { ...(opts.env || process.env), NX_INVOKED_BY_RUNNER: undefined },
|
||||
encoding: 'utf-8',
|
||||
})
|
||||
.toString()
|
||||
.replace(
|
||||
@ -358,7 +364,7 @@ export function runCLI(
|
||||
let r = execSync(`${pm.runNx} ${command}`, {
|
||||
cwd: opts.cwd || tmpProjPath(),
|
||||
env: { ...(opts.env || process.env), NX_INVOKED_BY_RUNNER: undefined },
|
||||
encoding: 'utf8',
|
||||
encoding: 'utf-8',
|
||||
maxBuffer: 50 * 1024 * 1024,
|
||||
}).toString();
|
||||
r = r.replace(
|
||||
@ -402,6 +408,7 @@ export function runCommand(command: string): string {
|
||||
FORCE_COLOR: 'false',
|
||||
NX_INVOKED_BY_RUNNER: undefined,
|
||||
},
|
||||
encoding: 'utf-8',
|
||||
}).toString();
|
||||
if (process.env.VERBOSE_OUTPUT) {
|
||||
console.log(r);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user