Skip to content

Commit 94d1d8f

Browse files
authored
Pull in Angular next version for tests (#299)
* bump angular version to canary in e2e tests * bump angular starter version * refactor rm func * bump upload-artifact * bump download-artifacts4 * use npx ng vs ng
1 parent 9e0287f commit 94d1d8f

19 files changed

+6447
-4333
lines changed

.github/workflows/test.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jobs:
4343
- name: Build
4444
run: npm run build
4545
- name: "Upload Artifact"
46-
uses: actions/upload-artifact@v3
46+
uses: actions/upload-artifact@v4
4747
with:
4848
path: |
4949
packages/*/dist/
@@ -89,7 +89,7 @@ jobs:
8989
path: ~/.cache/firebase/emulators
9090
key: firebase_emulators
9191
- name: Download Artifacts
92-
uses: actions/download-artifact@v3
92+
uses: actions/download-artifact@v4
9393
- name: Rsync Artifacts
9494
run: rsync -a artifact/ packages
9595
- name: Test
@@ -146,7 +146,7 @@ jobs:
146146
check-latest: false
147147
registry-url: "https://registry.npmjs.org"
148148
- name: "Download Artifacts"
149-
uses: actions/download-artifact@v3
149+
uses: actions/download-artifact@v4
150150
- name: Rsync Artifacts
151151
run: rsync -a artifact/ packages
152152
- name: Publish

packages/@apphosting/adapter-angular/e2e/run-local.ts

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@ import { parse as parseYaml } from "yaml";
66
import { spawn } from "child_process";
77
import fsExtra from "fs-extra";
88

9-
const { readFileSync, mkdirp, readJSON, writeJSON, rmdir } = fsExtra;
9+
const { readFileSync, mkdirp, readJSON, writeJSON, rm } = fsExtra;
1010
const __dirname = dirname(fileURLToPath(import.meta.url));
1111

1212
const starterTemplateDir = "../../../starters/angular/basic";
1313

1414
const errors: any[] = [];
1515

16-
await rmdir(join(__dirname, "runs"), { recursive: true }).catch(() => undefined);
16+
await rm(join(__dirname, "runs"), { recursive: true }).catch(() => undefined);
1717

1818
console.log("\nBuilding and starting test projects in parallel...");
1919

@@ -41,7 +41,13 @@ const tests = await Promise.all(
4141
stdio: "inherit",
4242
shell: true,
4343
});
44-
44+
console.log(`[${runId}] updating angular to next tag`);
45+
console.log(`[${runId}] > npx ng update @angular/cli@next @angular/core@next`);
46+
await promiseSpawn("npx", ["ng", "update", "@angular/cli@next", "@angular/core@next"], {
47+
cwd,
48+
stdio: "inherit",
49+
shell: true,
50+
});
4551
const angularJSON = JSON.parse((await readFile(join(cwd, "angular.json"))).toString());
4652

4753
if (!enableSSR) {

0 commit comments

Comments
 (0)