Merge branch 'main' into thyeggman/implement-job-context-provider

This commit is contained in:
Jacob Wallraff
2022-12-15 15:43:28 -08:00
22 changed files with 1043 additions and 119 deletions
@@ -367,7 +367,7 @@ jobs:
});
});
describe("multi-line strings", () => {
describe("multi-line strings warnings", () => {
it("indented |", async () => {
const input = `on: push
jobs:
@@ -489,6 +489,124 @@ jobs:
});
});
describe("multi-line strings errors", () => {
it("indented |", async () => {
const input = `on: push
jobs:
build:
runs-on: ubuntu-latest
steps:
- run: |
first line
test \${{ fromJSON2('') }}
test2`;
const result = await validate(createDocument("wf.yaml", input));
expect(result).toEqual([
{
message: "Unrecognized function: 'fromJSON2'",
range: {
end: {
character: 35,
line: 7
},
start: {
character: 15,
line: 7
}
}
}
]);
});
it("indented |+", async () => {
const input = `on: push
jobs:
build:
runs-on: ubuntu-latest
steps:
- run: |+
first line
test \${{ fromJSON2('') }}
test2`;
const result = await validate(createDocument("wf.yaml", input));
expect(result).toEqual([
{
message: "Unrecognized function: 'fromJSON2'",
range: {
end: {
character: 35,
line: 7
},
start: {
character: 15,
line: 7
}
}
}
]);
});
it("indented >", async () => {
const input = `on: push
jobs:
build:
runs-on: ubuntu-latest
steps:
- run: >
first line
test \${{ fromJSON2('') }}
test2`;
const result = await validate(createDocument("wf.yaml", input));
expect(result).toEqual([
{
message: "Unrecognized function: 'fromJSON2'",
range: {
end: {
character: 35,
line: 7
},
start: {
character: 15,
line: 7
}
}
}
]);
});
it("indented >+", async () => {
const input = `on: push
jobs:
build:
runs-on: ubuntu-latest
steps:
- run: >+
first line
test \${{ fromJSON2('') }}
test2`;
const result = await validate(createDocument("wf.yaml", input));
expect(result).toEqual([
{
message: "Unrecognized function: 'fromJSON2'",
range: {
end: {
character: 35,
line: 7
},
start: {
character: 15,
line: 7
}
}
}
]);
});
});
describe("matrix context", () => {
it("reference within a matrix job", async () => {
const input = `