+
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 2 additions & 35 deletions .circleci/dynamic/index.ts
Original file line number Diff line number Diff line change
@@ -1,36 +1,3 @@
import * as fs from "fs";
import CircleCI from "@circleci/circleci-config-sdk";
import { createConfig, JobNames } from "@getlocalci/create-config";

const config = new CircleCI.Config();
const workflow = new CircleCI.Workflow("test-lint");
config.addWorkflow(workflow);

[
new CircleCI.Job(
"test",
new CircleCI.executors.DockerExecutor("cimg/node:16.17", "large"),
[
new CircleCI.commands.Checkout(),
new CircleCI.commands.Run({
command: "npm ci && npm test && npm run lint",
}),
]
),
new CircleCI.Job(
"package",
new CircleCI.executors.DockerExecutor("cimg/node:16.8.0-browsers", "large"),
[
new CircleCI.commands.Checkout(),
new CircleCI.commands.Run({ command: "npm ci && npm run vsix" }),
new CircleCI.commands.Run({
command: "mkdir /tmp/artifacts && mv local-ci*.vsix /tmp/artifacts",
}),
new CircleCI.commands.StoreArtifacts({ path: "/tmp/artifacts" }),
]
),
].forEach((job) => {
config.addJob(job);
workflow.addJob(job);
});

fs.writeFile("./dynamicConfig.yml", config.stringify(), () => {});
createConfig(JobNames.JsTest, JobNames.JsLint, JobNames.Vsix);
178 changes: 177 additions & 1 deletion .circleci/dynamic/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions .circleci/dynamic/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
"scripts": {
"lint": "prettier --check index.ts",
"lint:fix": "prettier --write index.ts",
"start": "ts-node --esm index.ts"
"start": "ts-node --esm --skipIgnore index.ts"
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Allows interpreting .ts files in node_modules/ as TypeScript

},
"license": "GPL-2.0-or-later",
"devDependencies": {
"@circleci/circleci-config-sdk": "^0.11.0",
"@getlocalci/create-config": "github:getlocalci/create-config",
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@circleci/circleci-config-sdk is used in @getlocalci/create-config

"@types/node": "^18.7.20",
"prettier": "^2.7.1",
"ts-node": "^10.9.1",
Expand Down
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载