Skip to content

Commit 900dd73

Browse files
authored
update wireit and github action cache setup version (#1417)
* update wireit * update github actions wireit cache version * disable wireit cache for api doc generation
1 parent 59af258 commit 900dd73

File tree

11 files changed

+49
-13
lines changed

11 files changed

+49
-13
lines changed

.github/workflows/build-and-publish-search-index.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
runs-on: macos-latest
1111
timeout-minutes: 10
1212
steps:
13-
- uses: google/wireit@setup-github-actions-caching/v1
13+
- uses: google/wireit@setup-github-actions-caching/v2
1414
- uses: actions/checkout@v3
1515
- uses: actions/setup-node@v3
1616
with:

.github/workflows/check-api-data-in-sync.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
steps:
1616
- uses: actions/checkout@v3
1717
- uses: actions/setup-node@v3
18-
- uses: google/wireit@setup-github-actions-caching/v1
18+
- uses: google/wireit@setup-github-actions-caching/v2
1919
with:
2020
node-version: 18
2121
cache: npm

.github/workflows/check-links.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ jobs:
77
runs-on: macos-latest
88
timeout-minutes: 10
99
steps:
10-
- uses: google/wireit@setup-github-actions-caching/v1
10+
- uses: google/wireit@setup-github-actions-caching/v2
1111
- uses: actions/checkout@v3
1212
- uses: actions/setup-node@v3
1313
with:

.github/workflows/integration-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ jobs:
77
runs-on: macos-latest
88
timeout-minutes: 20
99
steps:
10-
- uses: google/wireit@setup-github-actions-caching/v1
10+
- uses: google/wireit@setup-github-actions-caching/v2
1111
- uses: actions/checkout@v3
1212
- uses: actions/setup-node@v3
1313
with:

.github/workflows/unit-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ jobs:
77
runs-on: macos-latest
88
timeout-minutes: 10
99
steps:
10-
- uses: google/wireit@setup-github-actions-caching/v1
10+
- uses: google/wireit@setup-github-actions-caching/v2
1111
- uses: actions/checkout@v3
1212
- uses: actions/setup-node@v3
1313
with:

package-lock.json

Lines changed: 29 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,6 @@
6464
"playground-elements": "^0.20.0",
6565
"prettier": "^2.1.2",
6666
"typescript": "~4.7.4",
67-
"wireit": "^0.14.0"
67+
"wireit": "^0.14.12"
6868
}
6969
}

packages/lit-dev-tools-cjs/src/api-docs/configs/lit-2.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ export const lit2Config: ApiDocsConfig = {
3333
{
3434
cmd: 'npm',
3535
args: ['run', 'build:ts'],
36+
// disable wireit cache for to avoid caching errors in Github Actions
37+
env: {WIREIT_CACHE: 'none'},
3638
},
3739
],
3840

packages/lit-dev-tools-cjs/src/api-docs/configs/lit-3.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ export const lit3Config: ApiDocsConfig = {
4646
{
4747
cmd: 'npm',
4848
args: ['run', 'build:ts'],
49+
// disable wireit cache for to avoid caching errors in Github Actions
50+
env: {WIREIT_CACHE: 'none'},
4951
},
5052
// Apply file patch to fix typedoc errors during docs generation. Because
5153
// `npm run build:ts` is run prior to this, the patch file can always be

packages/lit-dev-tools-cjs/src/api-docs/generate.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,12 @@ const INSTALLED_FILE = 'INSTALLED';
6262
const setup = async (config: ApiDocsConfig) => {
6363
console.log(`running npm ci in ${config.gitDir}`);
6464
await execFileAsync('npm', ['ci'], {cwd: config.gitDir});
65-
for (const {cmd, args} of config.extraSetupCommands ?? []) {
65+
for (const {cmd, args, env} of config.extraSetupCommands ?? []) {
6666
console.log(`running ${cmd} ${args.join(' ')} in ${config.gitDir}`);
67-
await execFileAsync(cmd, args, {cwd: config.gitDir});
67+
await execFileAsync(cmd, args, {
68+
cwd: config.gitDir,
69+
env: {...process.env, ...env},
70+
});
6871
}
6972
await fs.writeFile(pathlib.join(config.workDir, INSTALLED_FILE), '', 'utf8');
7073
};

packages/lit-dev-tools-cjs/src/api-docs/types.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,11 @@ export interface ApiDocsConfig {
9393
* Extra setup/build commands to run after NPM install and before running
9494
* TypeDoc.
9595
*/
96-
extraSetupCommands?: Array<{cmd: string; args: string[]}>;
96+
extraSetupCommands?: Array<{
97+
cmd: string;
98+
args: string[];
99+
env?: Record<string, string>;
100+
}>;
97101

98102
/**
99103
* Entrypoint TypeScript modules for TypeDoc to analyze.

0 commit comments

Comments
 (0)