Skip to content

Commit

Permalink
chore(repo): skip building obsolete packages for e2e (nrwl#9048)
Browse files Browse the repository at this point in the history
  • Loading branch information
meeroslav committed Mar 4, 2022
1 parent b1b58b0 commit a55cb51
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 4 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/e2e-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ jobs:
key: windows-node-${{ matrix.node_version }}-yarn-${{ hashFiles('yarn.lock') }}
restore-keys: |
windows-node-${{ matrix.node_version }}-yarn-
windows-node-${{ matrix.node_version }}-
windows-
- name: Install packages
run: yarn install --prefer-offline --frozen-lockfile --non-interactive
Expand Down
29 changes: 25 additions & 4 deletions scripts/e2e-build-package-publish.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,10 +104,31 @@ async function publishPackage(packagePath: string, npmMajorVersion: number) {
function build(nxVersion: string) {
try {
const b = new Date();
execSync('npx nx run-many --target=build --all --parallel=8', {
stdio: ['pipe', 'pipe', 'pipe'],
env: { ...process.env, NX_INVOKED_BY_RUNNER: 'false' },
});
const projectsToExclude = [
'docs',
'nx-dev-data-access-documents',
'nx-dev-e2e',
'nx-dev',
'nx-dev-feature-analytics',
'nx-dev-feature-conf',
'nx-dev-feature-doc-viewer',
'nx-dev-feature-search',
'nx-dev-feature-storage',
'nx-dev-feature-versions-and-flavors',
'nx-dev-ui-commands',
'nx-dev-ui-common',
'nx-dev-ui-home',
'nx-dev-ui-member-card',
'nx-dev-ui-sponsor-card',
'typedoc-theme',
].join(',');
execSync(
`npx nx run-many --target=build --all --parallel=8 --exclude=${projectsToExclude}`,
{
stdio: ['pipe', 'pipe', 'pipe'],
env: { ...process.env, NX_INVOKED_BY_RUNNER: 'false' },
}
);
const a = new Date();
console.log(`Packages built successfully in ${a.getTime() - b.getTime()}`);
} catch (e) {
Expand Down

0 comments on commit a55cb51

Please sign in to comment.