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:
|
os:
|
||||||
- ubuntu-latest
|
- ubuntu-latest
|
||||||
# - windows-latest
|
# - windows-latest
|
||||||
|
include:
|
||||||
|
- os: ubuntu-latest
|
||||||
|
os-name: ubuntu
|
||||||
|
# - os: windows-latest
|
||||||
|
# os-name: windows
|
||||||
node_version:
|
node_version:
|
||||||
- '14'
|
- '14'
|
||||||
# - '15'
|
# - '15'
|
||||||
@ -37,7 +42,7 @@ jobs:
|
|||||||
- e2e-angular
|
- e2e-angular
|
||||||
fail-fast: false
|
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:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
@ -60,7 +65,8 @@ jobs:
|
|||||||
key: ${{ matrix.os }}-node-${{ matrix.node-version }}-yarn-${{ hashFiles('yarn.lock') }}
|
key: ${{ matrix.os }}-node-${{ matrix.node-version }}-yarn-${{ hashFiles('yarn.lock') }}
|
||||||
restore-keys: ${{ matrix.os }}-node-${{ matrix.node-version }}-yarn-
|
restore-keys: ${{ matrix.os }}-node-${{ matrix.node-version }}-yarn-
|
||||||
|
|
||||||
- run: yarn install
|
- name: Install packages
|
||||||
|
run: yarn install --prefer-offline --non-interactive
|
||||||
|
|
||||||
- name: Cleanup
|
- name: Cleanup
|
||||||
if: ${{ matrix.os == 'ubuntu-latest' }}
|
if: ${{ matrix.os == 'ubuntu-latest' }}
|
||||||
@ -71,6 +77,8 @@ jobs:
|
|||||||
sudo rm -rf /opt/ghc
|
sudo rm -rf /opt/ghc
|
||||||
sudo rm -rf "/usr/local/share/boost"
|
sudo rm -rf "/usr/local/share/boost"
|
||||||
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
|
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
|
- name: Install PNPM
|
||||||
if: ${{ matrix.package_manager == 'pnpm' }}
|
if: ${{ matrix.package_manager == 'pnpm' }}
|
||||||
|
|||||||
@ -109,6 +109,7 @@ export function runCreateWorkspace(
|
|||||||
cwd: e2eCwd,
|
cwd: e2eCwd,
|
||||||
stdio: [0, 1, 2],
|
stdio: [0, 1, 2],
|
||||||
env: process.env,
|
env: process.env,
|
||||||
|
encoding: 'utf-8',
|
||||||
});
|
});
|
||||||
return create ? create.toString() : '';
|
return create ? create.toString() : '';
|
||||||
}
|
}
|
||||||
@ -121,6 +122,7 @@ export function packageInstall(pkg: string, projName?: string) {
|
|||||||
// ...{ stdio: ['pipe', 'pipe', 'pipe'] },
|
// ...{ stdio: ['pipe', 'pipe', 'pipe'] },
|
||||||
...{ stdio: [0, 1, 2] },
|
...{ stdio: [0, 1, 2] },
|
||||||
env: process.env,
|
env: process.env,
|
||||||
|
encoding: 'utf-8',
|
||||||
});
|
});
|
||||||
return install ? install.toString() : '';
|
return install ? install.toString() : '';
|
||||||
}
|
}
|
||||||
@ -132,6 +134,7 @@ export function runNgNew(projectName: string): string {
|
|||||||
{
|
{
|
||||||
cwd: e2eCwd,
|
cwd: e2eCwd,
|
||||||
env: process.env,
|
env: process.env,
|
||||||
|
encoding: 'utf-8',
|
||||||
}
|
}
|
||||||
).toString();
|
).toString();
|
||||||
}
|
}
|
||||||
@ -254,6 +257,7 @@ export function runCommandAsync(
|
|||||||
FORCE_COLOR: 'false',
|
FORCE_COLOR: 'false',
|
||||||
NX_INVOKED_BY_RUNNER: undefined,
|
NX_INVOKED_BY_RUNNER: undefined,
|
||||||
},
|
},
|
||||||
|
encoding: 'utf-8',
|
||||||
},
|
},
|
||||||
(err, stdout, stderr) => {
|
(err, stdout, stderr) => {
|
||||||
if (!opts.silenceError && err) {
|
if (!opts.silenceError && err) {
|
||||||
@ -277,6 +281,7 @@ export function runCommandUntil(
|
|||||||
FORCE_COLOR: 'false',
|
FORCE_COLOR: 'false',
|
||||||
NX_INVOKED_BY_RUNNER: undefined,
|
NX_INVOKED_BY_RUNNER: undefined,
|
||||||
},
|
},
|
||||||
|
encoding: 'utf-8',
|
||||||
});
|
});
|
||||||
return new Promise((res, rej) => {
|
return new Promise((res, rej) => {
|
||||||
let output = '';
|
let output = '';
|
||||||
@ -330,6 +335,7 @@ export function runNgAdd(
|
|||||||
return execSync(`./node_modules/.bin/ng add @nrwl/workspace ${command}`, {
|
return execSync(`./node_modules/.bin/ng add @nrwl/workspace ${command}`, {
|
||||||
cwd: tmpProjPath(),
|
cwd: tmpProjPath(),
|
||||||
env: { ...(opts.env || process.env), NX_INVOKED_BY_RUNNER: undefined },
|
env: { ...(opts.env || process.env), NX_INVOKED_BY_RUNNER: undefined },
|
||||||
|
encoding: 'utf-8',
|
||||||
})
|
})
|
||||||
.toString()
|
.toString()
|
||||||
.replace(
|
.replace(
|
||||||
@ -358,7 +364,7 @@ export function runCLI(
|
|||||||
let r = execSync(`${pm.runNx} ${command}`, {
|
let r = execSync(`${pm.runNx} ${command}`, {
|
||||||
cwd: opts.cwd || tmpProjPath(),
|
cwd: opts.cwd || tmpProjPath(),
|
||||||
env: { ...(opts.env || process.env), NX_INVOKED_BY_RUNNER: undefined },
|
env: { ...(opts.env || process.env), NX_INVOKED_BY_RUNNER: undefined },
|
||||||
encoding: 'utf8',
|
encoding: 'utf-8',
|
||||||
maxBuffer: 50 * 1024 * 1024,
|
maxBuffer: 50 * 1024 * 1024,
|
||||||
}).toString();
|
}).toString();
|
||||||
r = r.replace(
|
r = r.replace(
|
||||||
@ -402,6 +408,7 @@ export function runCommand(command: string): string {
|
|||||||
FORCE_COLOR: 'false',
|
FORCE_COLOR: 'false',
|
||||||
NX_INVOKED_BY_RUNNER: undefined,
|
NX_INVOKED_BY_RUNNER: undefined,
|
||||||
},
|
},
|
||||||
|
encoding: 'utf-8',
|
||||||
}).toString();
|
}).toString();
|
||||||
if (process.env.VERBOSE_OUTPUT) {
|
if (process.env.VERBOSE_OUTPUT) {
|
||||||
console.log(r);
|
console.log(r);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user