diff --git a/actions-expressions/package.json b/actions-expressions/package.json index 5ce426f..84a189f 100755 --- a/actions-expressions/package.json +++ b/actions-expressions/package.json @@ -1,6 +1,6 @@ { "name": "@github/actions-expressions", - "version": "0.1.148", + "version": "0.1.150", "license": "MIT", "type": "module", "source": "./src/index.ts", diff --git a/actions-languageserver/package.json b/actions-languageserver/package.json index 8569906..7ca792b 100644 --- a/actions-languageserver/package.json +++ b/actions-languageserver/package.json @@ -1,6 +1,6 @@ { "name": "@github/actions-languageserver", - "version": "0.1.148", + "version": "0.1.150", "description": "Language server for GitHub Actions", "license": "MIT", "type": "module", @@ -38,8 +38,8 @@ "watch": "tsc --build tsconfig.build.json --watch" }, "dependencies": { - "@github/actions-languageservice": "^0.1.148", - "@github/actions-workflow-parser": "^0.1.148", + "@github/actions-languageservice": "^0.1.150", + "@github/actions-workflow-parser": "^0.1.150", "@octokit/rest": "^19.0.7", "vscode-languageserver": "^8.0.2", "vscode-languageserver-textdocument": "^1.0.7", diff --git a/actions-languageserver/src/utils/timer.ts b/actions-languageserver/src/utils/timer.ts index 0278a11..f9dc71e 100644 --- a/actions-languageserver/src/utils/timer.ts +++ b/actions-languageserver/src/utils/timer.ts @@ -1,8 +1,12 @@ import {log} from "@github/actions-languageservice/log"; -export function timeOperation(name: string, f: () => T): T { +export async function timeOperation(name: string, f: () => T): Promise { const start = Date.now(); const result = f(); + if (result instanceof Promise) { + await result; + } + const end = Date.now(); log(`${name} took ${end - start}ms`); diff --git a/actions-languageservice/package.json b/actions-languageservice/package.json index 9380643..ae28a06 100644 --- a/actions-languageservice/package.json +++ b/actions-languageservice/package.json @@ -1,6 +1,6 @@ { "name": "@github/actions-languageservice", - "version": "0.1.148", + "version": "0.1.150", "description": "Language service for GitHub Actions", "license": "MIT", "type": "module", @@ -39,8 +39,8 @@ "watch": "tsc --build tsconfig.build.json --watch" }, "dependencies": { - "@github/actions-expressions": "^0.1.148", - "@github/actions-workflow-parser": "^0.1.148", + "@github/actions-expressions": "^0.1.150", + "@github/actions-workflow-parser": "^0.1.150", "vscode-languageserver-textdocument": "^1.0.7", "vscode-languageserver-types": "^3.17.2", "yaml": "^2.1.1" diff --git a/actions-workflow-parser/package.json b/actions-workflow-parser/package.json index b8ec9b8..44beec6 100644 --- a/actions-workflow-parser/package.json +++ b/actions-workflow-parser/package.json @@ -1,6 +1,6 @@ { "name": "@github/actions-workflow-parser", - "version": "0.1.148", + "version": "0.1.150", "license": "MIT", "type": "module", "source": "./src/index.ts", @@ -40,7 +40,7 @@ "watch": "tsc --build tsconfig.build.json --watch" }, "dependencies": { - "@github/actions-expressions": "^0.1.148", + "@github/actions-expressions": "^0.1.150", "cronstrue": "^2.21.0", "yaml": "^2.0.0-8" }, diff --git a/actions-workflow-parser/src/xlang.test.ts b/actions-workflow-parser/src/xlang.test.ts index 42a2b77..5aeb845 100644 --- a/actions-workflow-parser/src/xlang.test.ts +++ b/actions-workflow-parser/src/xlang.test.ts @@ -20,10 +20,13 @@ const nullTrace: TraceWriter = { }; const testFiles = "./testdata/reader"; +const skippedTestsFile = "./testdata/skipped-tests.txt"; describe("x-lang tests", () => { const files = fs.readdirSync(testFiles); + const skippedTests = new Set(fs.readFileSync(skippedTestsFile, "utf8").split(/\n/)); + for (const file of files) { const fileName = path.join(testFiles, file); @@ -42,7 +45,7 @@ describe("x-lang tests", () => { expect(testDocs.length).toBeGreaterThanOrEqual(3); const testOptions: TestOptions = YAML.parse(testDocs[0]); - const unsupportedTest = contains(testOptions.skip, "TypeScript"); + const unsupportedTest = skippedTests.has(file); const test = async () => { const testFileName = ".github/workflows" + fileName.substring(fileName.lastIndexOf("/")); diff --git a/actions-workflow-parser/testdata/reader/coercion-to-string.yml b/actions-workflow-parser/testdata/reader/coercion-to-string.yml new file mode 100644 index 0000000..2440c0d --- /dev/null +++ b/actions-workflow-parser/testdata/reader/coercion-to-string.yml @@ -0,0 +1,100 @@ +include-source: false # Drop file/line/col from output +--- +on: push +jobs: + build: + runs-on: ubuntu-latest + steps: + # Env is a string-string mapping. Null, bool, and numbers are all coerced to strings. + # + # When numbers are coerced to string, choosing too high/low of a precision are both problematic. + # This is due to how fractional numbers are represented in double-precision floating point format. + # + # The chosen format specifier produces the best results overall results. + - run: printenv + env: + "null": !!null + bool1: !!bool true + bool2: !!bool false + num1: !!float 0.84551240822557006 # Coerces to string "0.84551240822557" + num2: !!float 123456 + num3: !!float 0.123456 + num4: !!float 123456.123456 + num5: !!float 1587106672383762434 # Coerces to string "1.58710667238376E+18" ; It would be nicer if this number successfully round-tripped, i.e. coerces to string "1587106672383762434" + num6: !!float .inf + num7: !!float -.inf + num8: !!float .nan +--- +{ + "jobs": [ + { + "type": "job", + "id": "build", + "name": "build", + "if": { + "type": 3, + "expr": "success()" + }, + "runs-on": "ubuntu-latest", + "steps": [ + { + "id": "__run", + "if": { + "type": 3, + "expr": "success()" + }, + "env": { + "type": 2, + "map": [ + { + "Key": "null", + "Value": "" + }, + { + "Key": "bool1", + "Value": "true" + }, + { + "Key": "bool2", + "Value": "false" + }, + { + "Key": "num1", + "Value": "0.84551240822557" + }, + { + "Key": "num2", + "Value": "123456" + }, + { + "Key": "num3", + "Value": "0.123456" + }, + { + "Key": "num4", + "Value": "123456.123456" + }, + { + "Key": "num5", + "Value": "1.58710667238376E+18" + }, + { + "Key": "num6", + "Value": "Infinity" + }, + { + "Key": "num7", + "Value": "-Infinity" + }, + { + "Key": "num8", + "Value": "NaN" + } + ] + }, + "run": "printenv" + } + ] + } + ] +} diff --git a/actions-workflow-parser/testdata/reader/concurrency.yml b/actions-workflow-parser/testdata/reader/concurrency.yml index b230bef..473f159 100644 --- a/actions-workflow-parser/testdata/reader/concurrency.yml +++ b/actions-workflow-parser/testdata/reader/concurrency.yml @@ -1,6 +1,4 @@ include-source: false # Drop file/line/col from output -skip: - - TypeScript --- on: push concurrency: diff --git a/actions-workflow-parser/testdata/reader/errors-insert.yml b/actions-workflow-parser/testdata/reader/errors-insert.yml index 6506202..8e91acf 100644 --- a/actions-workflow-parser/testdata/reader/errors-insert.yml +++ b/actions-workflow-parser/testdata/reader/errors-insert.yml @@ -1,4 +1,6 @@ include-source: false # Drop file/line/col from output +skip: + - TypeScript --- on: push jobs: diff --git a/actions-workflow-parser/testdata/reader/errors-invalid-mapping-key.yml b/actions-workflow-parser/testdata/reader/errors-invalid-mapping-key.yml index 1611363..81ecbe6 100644 --- a/actions-workflow-parser/testdata/reader/errors-invalid-mapping-key.yml +++ b/actions-workflow-parser/testdata/reader/errors-invalid-mapping-key.yml @@ -1,6 +1,4 @@ include-source: false # Drop file/line/col from output -skip: - - TypeScript --- on: push jobs: diff --git a/actions-workflow-parser/testdata/reader/errors-job-concurrency.yml b/actions-workflow-parser/testdata/reader/errors-job-concurrency.yml index 4fc9392..8eee053 100644 --- a/actions-workflow-parser/testdata/reader/errors-job-concurrency.yml +++ b/actions-workflow-parser/testdata/reader/errors-job-concurrency.yml @@ -1,6 +1,4 @@ include-source: false # Drop file/line/col from output -skip: - - TypeScript --- on: push jobs: diff --git a/actions-workflow-parser/testdata/reader/errors-job-runs-on-group-invalid-prefix.yml b/actions-workflow-parser/testdata/reader/errors-job-runs-on-group-invalid-prefix.yml index 1c8e3c7..1726575 100644 --- a/actions-workflow-parser/testdata/reader/errors-job-runs-on-group-invalid-prefix.yml +++ b/actions-workflow-parser/testdata/reader/errors-job-runs-on-group-invalid-prefix.yml @@ -1,6 +1,4 @@ include-source: false # Drop file/line/col from output -skip: - - TypeScript --- on: push jobs: diff --git a/actions-workflow-parser/testdata/reader/errors-matrix-empty-vector.yml b/actions-workflow-parser/testdata/reader/errors-matrix-empty-vector.yml index 6c4a744..1cce7ef 100644 --- a/actions-workflow-parser/testdata/reader/errors-matrix-empty-vector.yml +++ b/actions-workflow-parser/testdata/reader/errors-matrix-empty-vector.yml @@ -1,6 +1,4 @@ include-source: false # Drop file/line/col from output -skip: - - TypeScript --- on: push jobs: diff --git a/actions-workflow-parser/testdata/reader/errors-matrix-max-depth.yml b/actions-workflow-parser/testdata/reader/errors-matrix-max-depth.yml index 6822766..423a67e 100644 --- a/actions-workflow-parser/testdata/reader/errors-matrix-max-depth.yml +++ b/actions-workflow-parser/testdata/reader/errors-matrix-max-depth.yml @@ -1,6 +1,4 @@ include-source: false # Drop file/line/col from output -skip: - - TypeScript --- on: push jobs: diff --git a/actions-workflow-parser/testdata/reader/errors-max-depth.yml b/actions-workflow-parser/testdata/reader/errors-max-depth.yml index 7076f8d..b5e9963 100644 --- a/actions-workflow-parser/testdata/reader/errors-max-depth.yml +++ b/actions-workflow-parser/testdata/reader/errors-max-depth.yml @@ -1,6 +1,4 @@ include-source: false # Drop file/line/col from output -skip: - - TypeScript max-depth: 5 --- on: push diff --git a/actions-workflow-parser/testdata/reader/errors-max-file-size.yml b/actions-workflow-parser/testdata/reader/errors-max-file-size.yml index 832bf53..7b3d178 100644 --- a/actions-workflow-parser/testdata/reader/errors-max-file-size.yml +++ b/actions-workflow-parser/testdata/reader/errors-max-file-size.yml @@ -1,6 +1,4 @@ include-source: false # Drop file/line/col from output -skip: - - TypeScript max-file-size: 124 --- on: push diff --git a/actions-workflow-parser/testdata/reader/errors-max-job-limit-with-reusable-workflow.yml b/actions-workflow-parser/testdata/reader/errors-max-job-limit-with-reusable-workflow.yml index 2e7aac0..ef315bf 100644 --- a/actions-workflow-parser/testdata/reader/errors-max-job-limit-with-reusable-workflow.yml +++ b/actions-workflow-parser/testdata/reader/errors-max-job-limit-with-reusable-workflow.yml @@ -1,7 +1,6 @@ include-source: false # Drop file/line/col from output skip: - Go - - TypeScript max-job-limit: 8 --- on: push diff --git a/actions-workflow-parser/testdata/reader/errors-max-result-size.yml b/actions-workflow-parser/testdata/reader/errors-max-result-size.yml index 82306fa..b0960e1 100644 --- a/actions-workflow-parser/testdata/reader/errors-max-result-size.yml +++ b/actions-workflow-parser/testdata/reader/errors-max-result-size.yml @@ -1,7 +1,5 @@ include-source: false # Drop file/line/col from output -skip: - - TypeScript -max-result-size: 768 +max-result-size: 1141 --- on: push jobs: diff --git a/actions-workflow-parser/testdata/reader/errors-reusable-workflow-job-inputs-type-mismatch.yml b/actions-workflow-parser/testdata/reader/errors-reusable-workflow-job-inputs-type-mismatch.yml index 1df5ce1..268eb6e 100644 --- a/actions-workflow-parser/testdata/reader/errors-reusable-workflow-job-inputs-type-mismatch.yml +++ b/actions-workflow-parser/testdata/reader/errors-reusable-workflow-job-inputs-type-mismatch.yml @@ -1,7 +1,6 @@ include-source: false # Drop file/line/col from output skip: - Go - - TypeScript --- on: push jobs: diff --git a/actions-workflow-parser/testdata/reader/errors-reusable-workflow-job-nested-depth-exceeded.yml b/actions-workflow-parser/testdata/reader/errors-reusable-workflow-job-nested-depth-exceeded.yml index 60f9db6..13ea7f6 100644 --- a/actions-workflow-parser/testdata/reader/errors-reusable-workflow-job-nested-depth-exceeded.yml +++ b/actions-workflow-parser/testdata/reader/errors-reusable-workflow-job-nested-depth-exceeded.yml @@ -1,7 +1,6 @@ include-source: false # Drop file/line/col from output skip: - Go - - TypeScript max-nested-reusable-workflows-depth: 2 --- on: push diff --git a/actions-workflow-parser/testdata/reader/errors-reusable-workflow-job-nested-permissions-not-allowed-job-level-from-caller-job-level.yml b/actions-workflow-parser/testdata/reader/errors-reusable-workflow-job-nested-permissions-not-allowed-job-level-from-caller-job-level.yml index a5b1ce3..9041aab 100644 --- a/actions-workflow-parser/testdata/reader/errors-reusable-workflow-job-nested-permissions-not-allowed-job-level-from-caller-job-level.yml +++ b/actions-workflow-parser/testdata/reader/errors-reusable-workflow-job-nested-permissions-not-allowed-job-level-from-caller-job-level.yml @@ -1,7 +1,6 @@ include-source: false # Drop file/line/col from output skip: - Go - - TypeScript --- permissions: actions: write diff --git a/actions-workflow-parser/testdata/reader/errors-reusable-workflow-job-nested-permissions-not-allowed-job-level-from-caller-workflow-level.yml b/actions-workflow-parser/testdata/reader/errors-reusable-workflow-job-nested-permissions-not-allowed-job-level-from-caller-workflow-level.yml index e8e74bf..533c444 100644 --- a/actions-workflow-parser/testdata/reader/errors-reusable-workflow-job-nested-permissions-not-allowed-job-level-from-caller-workflow-level.yml +++ b/actions-workflow-parser/testdata/reader/errors-reusable-workflow-job-nested-permissions-not-allowed-job-level-from-caller-workflow-level.yml @@ -1,7 +1,6 @@ include-source: false # Drop file/line/col from output skip: - Go - - TypeScript --- permissions: actions: write diff --git a/actions-workflow-parser/testdata/reader/errors-reusable-workflow-job-nested-permissions-not-allowed-workflow-level-from-caller-job-level.yml b/actions-workflow-parser/testdata/reader/errors-reusable-workflow-job-nested-permissions-not-allowed-workflow-level-from-caller-job-level.yml index 40a20a1..76e196b 100644 --- a/actions-workflow-parser/testdata/reader/errors-reusable-workflow-job-nested-permissions-not-allowed-workflow-level-from-caller-job-level.yml +++ b/actions-workflow-parser/testdata/reader/errors-reusable-workflow-job-nested-permissions-not-allowed-workflow-level-from-caller-job-level.yml @@ -1,7 +1,6 @@ include-source: false # Drop file/line/col from output skip: - Go - - TypeScript --- permissions: actions: write diff --git a/actions-workflow-parser/testdata/reader/errors-reusable-workflow-job-nested-permissions-not-allowed-workflow-level-from-caller-workflow-level.yml b/actions-workflow-parser/testdata/reader/errors-reusable-workflow-job-nested-permissions-not-allowed-workflow-level-from-caller-workflow-level.yml index d92939f..f571bfb 100644 --- a/actions-workflow-parser/testdata/reader/errors-reusable-workflow-job-nested-permissions-not-allowed-workflow-level-from-caller-workflow-level.yml +++ b/actions-workflow-parser/testdata/reader/errors-reusable-workflow-job-nested-permissions-not-allowed-workflow-level-from-caller-workflow-level.yml @@ -1,7 +1,6 @@ include-source: false # Drop file/line/col from output skip: - Go - - TypeScript --- permissions: actions: write diff --git a/actions-workflow-parser/testdata/reader/errors-reusable-workflow-job-secrets.yml b/actions-workflow-parser/testdata/reader/errors-reusable-workflow-job-secrets.yml index dac0d5a..099e871 100644 --- a/actions-workflow-parser/testdata/reader/errors-reusable-workflow-job-secrets.yml +++ b/actions-workflow-parser/testdata/reader/errors-reusable-workflow-job-secrets.yml @@ -1,6 +1,4 @@ include-source: false # Drop file/line/col from output -skip: - - Go --- on: push jobs: diff --git a/actions-workflow-parser/testdata/reader/errors-reusable-workflow-max-result-size.yml b/actions-workflow-parser/testdata/reader/errors-reusable-workflow-max-result-size.yml index 567a3e4..48da91b 100644 --- a/actions-workflow-parser/testdata/reader/errors-reusable-workflow-max-result-size.yml +++ b/actions-workflow-parser/testdata/reader/errors-reusable-workflow-max-result-size.yml @@ -2,7 +2,6 @@ include-source: false # Drop file/line/col from output max-result-size: 2048 skip: - Go - - TypeScript --- on: push jobs: @@ -21,10 +20,7 @@ jobs: { "errors": [ { - "Message": "contoso/templates/.github/workflows/deploy.yml@v1: Maximum object size exceeded" - }, - { - "Message": "Unexpected type '' encountered while reading 'root'. The type 'MappingToken' was expected." + "Message": "In .github/workflows/errors-reusable-workflow-max-result-size.yml (Line: 4, Col: 20): Error from called workflow contoso/templates/.github/workflows/deploy.yml@v1: Maximum object size exceeded" } ] } diff --git a/actions-workflow-parser/testdata/reader/errors-reusable-workflow-permissions-not-allowed-job-level-from-caller-default.yml b/actions-workflow-parser/testdata/reader/errors-reusable-workflow-permissions-not-allowed-job-level-from-caller-default.yml index 4051c23..0793610 100644 --- a/actions-workflow-parser/testdata/reader/errors-reusable-workflow-permissions-not-allowed-job-level-from-caller-default.yml +++ b/actions-workflow-parser/testdata/reader/errors-reusable-workflow-permissions-not-allowed-job-level-from-caller-default.yml @@ -1,7 +1,6 @@ include-source: false # Drop file/line/col from output skip: - Go - - TypeScript permissions-policy: LimitedRead --- on: push diff --git a/actions-workflow-parser/testdata/reader/errors-reusable-workflow-permissions-not-allowed-job-level-from-caller-job-level.yml b/actions-workflow-parser/testdata/reader/errors-reusable-workflow-permissions-not-allowed-job-level-from-caller-job-level.yml index f77fb2a..d1f49b4 100644 --- a/actions-workflow-parser/testdata/reader/errors-reusable-workflow-permissions-not-allowed-job-level-from-caller-job-level.yml +++ b/actions-workflow-parser/testdata/reader/errors-reusable-workflow-permissions-not-allowed-job-level-from-caller-job-level.yml @@ -1,7 +1,6 @@ include-source: false # Drop file/line/col from output skip: - Go - - TypeScript --- on: push jobs: diff --git a/actions-workflow-parser/testdata/reader/errors-reusable-workflow-permissions-not-allowed-job-level-from-caller-workflow-level.yml b/actions-workflow-parser/testdata/reader/errors-reusable-workflow-permissions-not-allowed-job-level-from-caller-workflow-level.yml index 9fc4cb6..8535043 100644 --- a/actions-workflow-parser/testdata/reader/errors-reusable-workflow-permissions-not-allowed-job-level-from-caller-workflow-level.yml +++ b/actions-workflow-parser/testdata/reader/errors-reusable-workflow-permissions-not-allowed-job-level-from-caller-workflow-level.yml @@ -1,7 +1,6 @@ include-source: false # Drop file/line/col from output skip: - Go - - TypeScript --- on: push permissions: diff --git a/actions-workflow-parser/testdata/reader/errors-reusable-workflow-permissions-not-allowed-request-actions-write.yml b/actions-workflow-parser/testdata/reader/errors-reusable-workflow-permissions-not-allowed-request-actions-write.yml index aee494b..6c16789 100644 --- a/actions-workflow-parser/testdata/reader/errors-reusable-workflow-permissions-not-allowed-request-actions-write.yml +++ b/actions-workflow-parser/testdata/reader/errors-reusable-workflow-permissions-not-allowed-request-actions-write.yml @@ -1,7 +1,6 @@ include-source: false # Drop file/line/col from output skip: - Go - - TypeScript permissions-policy: LimitedRead --- on: push diff --git a/actions-workflow-parser/testdata/reader/errors-reusable-workflow-permissions-not-allowed-request-checks-write.yml b/actions-workflow-parser/testdata/reader/errors-reusable-workflow-permissions-not-allowed-request-checks-write.yml index 19243c4..643dccd 100644 --- a/actions-workflow-parser/testdata/reader/errors-reusable-workflow-permissions-not-allowed-request-checks-write.yml +++ b/actions-workflow-parser/testdata/reader/errors-reusable-workflow-permissions-not-allowed-request-checks-write.yml @@ -1,7 +1,6 @@ include-source: false # Drop file/line/col from output skip: - Go - - TypeScript permissions-policy: LimitedRead --- on: push diff --git a/actions-workflow-parser/testdata/reader/errors-reusable-workflow-permissions-not-allowed-request-contents-write.yml b/actions-workflow-parser/testdata/reader/errors-reusable-workflow-permissions-not-allowed-request-contents-write.yml index 52603d1..47cec4f 100644 --- a/actions-workflow-parser/testdata/reader/errors-reusable-workflow-permissions-not-allowed-request-contents-write.yml +++ b/actions-workflow-parser/testdata/reader/errors-reusable-workflow-permissions-not-allowed-request-contents-write.yml @@ -1,7 +1,6 @@ include-source: false # Drop file/line/col from output skip: - Go - - TypeScript permissions-policy: LimitedRead --- on: push diff --git a/actions-workflow-parser/testdata/reader/errors-reusable-workflow-permissions-not-allowed-request-deployments-write.yml b/actions-workflow-parser/testdata/reader/errors-reusable-workflow-permissions-not-allowed-request-deployments-write.yml index 4d3fcd3..81f97cb 100644 --- a/actions-workflow-parser/testdata/reader/errors-reusable-workflow-permissions-not-allowed-request-deployments-write.yml +++ b/actions-workflow-parser/testdata/reader/errors-reusable-workflow-permissions-not-allowed-request-deployments-write.yml @@ -1,7 +1,6 @@ include-source: false # Drop file/line/col from output skip: - Go - - TypeScript permissions-policy: LimitedRead --- on: push diff --git a/actions-workflow-parser/testdata/reader/errors-reusable-workflow-permissions-not-allowed-request-discussions-write.yml b/actions-workflow-parser/testdata/reader/errors-reusable-workflow-permissions-not-allowed-request-discussions-write.yml index 72473e7..c79f80b 100644 --- a/actions-workflow-parser/testdata/reader/errors-reusable-workflow-permissions-not-allowed-request-discussions-write.yml +++ b/actions-workflow-parser/testdata/reader/errors-reusable-workflow-permissions-not-allowed-request-discussions-write.yml @@ -1,7 +1,6 @@ include-source: false # Drop file/line/col from output skip: - Go - - TypeScript permissions-policy: LimitedRead --- on: push diff --git a/actions-workflow-parser/testdata/reader/errors-reusable-workflow-permissions-not-allowed-request-id-token-write.yml b/actions-workflow-parser/testdata/reader/errors-reusable-workflow-permissions-not-allowed-request-id-token-write.yml index 1d4f128..fc062d6 100644 --- a/actions-workflow-parser/testdata/reader/errors-reusable-workflow-permissions-not-allowed-request-id-token-write.yml +++ b/actions-workflow-parser/testdata/reader/errors-reusable-workflow-permissions-not-allowed-request-id-token-write.yml @@ -1,7 +1,6 @@ include-source: false # Drop file/line/col from output skip: - Go - - TypeScript permissions-policy: LimitedRead --- on: push diff --git a/actions-workflow-parser/testdata/reader/errors-reusable-workflow-permissions-not-allowed-request-issues-write.yml b/actions-workflow-parser/testdata/reader/errors-reusable-workflow-permissions-not-allowed-request-issues-write.yml index 3cb7d0a..0ef1272 100644 --- a/actions-workflow-parser/testdata/reader/errors-reusable-workflow-permissions-not-allowed-request-issues-write.yml +++ b/actions-workflow-parser/testdata/reader/errors-reusable-workflow-permissions-not-allowed-request-issues-write.yml @@ -1,7 +1,6 @@ include-source: false # Drop file/line/col from output skip: - Go - - TypeScript permissions-policy: LimitedRead --- on: push diff --git a/actions-workflow-parser/testdata/reader/errors-reusable-workflow-permissions-not-allowed-request-packages-write.yml b/actions-workflow-parser/testdata/reader/errors-reusable-workflow-permissions-not-allowed-request-packages-write.yml index 1e6c9c4..ecc4cf3 100644 --- a/actions-workflow-parser/testdata/reader/errors-reusable-workflow-permissions-not-allowed-request-packages-write.yml +++ b/actions-workflow-parser/testdata/reader/errors-reusable-workflow-permissions-not-allowed-request-packages-write.yml @@ -1,7 +1,6 @@ include-source: false # Drop file/line/col from output skip: - Go - - TypeScript permissions-policy: LimitedRead --- on: push diff --git a/actions-workflow-parser/testdata/reader/errors-reusable-workflow-permissions-not-allowed-request-pages-write.yml b/actions-workflow-parser/testdata/reader/errors-reusable-workflow-permissions-not-allowed-request-pages-write.yml index babdc6b..d671e23 100644 --- a/actions-workflow-parser/testdata/reader/errors-reusable-workflow-permissions-not-allowed-request-pages-write.yml +++ b/actions-workflow-parser/testdata/reader/errors-reusable-workflow-permissions-not-allowed-request-pages-write.yml @@ -1,7 +1,6 @@ include-source: false # Drop file/line/col from output skip: - Go - - TypeScript permissions-policy: LimitedRead --- on: push diff --git a/actions-workflow-parser/testdata/reader/errors-reusable-workflow-permissions-not-allowed-request-pull-requests-write.yml b/actions-workflow-parser/testdata/reader/errors-reusable-workflow-permissions-not-allowed-request-pull-requests-write.yml index 68c3a23..7c9f558 100644 --- a/actions-workflow-parser/testdata/reader/errors-reusable-workflow-permissions-not-allowed-request-pull-requests-write.yml +++ b/actions-workflow-parser/testdata/reader/errors-reusable-workflow-permissions-not-allowed-request-pull-requests-write.yml @@ -1,7 +1,6 @@ include-source: false # Drop file/line/col from output skip: - Go - - TypeScript permissions-policy: LimitedRead --- on: push diff --git a/actions-workflow-parser/testdata/reader/errors-reusable-workflow-permissions-not-allowed-request-read-all-allowed-none.yml b/actions-workflow-parser/testdata/reader/errors-reusable-workflow-permissions-not-allowed-request-read-all-allowed-none.yml index 5f520bc..8ba8409 100644 --- a/actions-workflow-parser/testdata/reader/errors-reusable-workflow-permissions-not-allowed-request-read-all-allowed-none.yml +++ b/actions-workflow-parser/testdata/reader/errors-reusable-workflow-permissions-not-allowed-request-read-all-allowed-none.yml @@ -1,7 +1,6 @@ include-source: false # Drop file/line/col from output skip: - Go - - TypeScript permissions-policy: LimitedRead # Note, the workflow names are intentionally short so the error message doesn't get truncated too much --- diff --git a/actions-workflow-parser/testdata/reader/errors-reusable-workflow-permissions-not-allowed-request-repository-projects-write.yml b/actions-workflow-parser/testdata/reader/errors-reusable-workflow-permissions-not-allowed-request-repository-projects-write.yml index 7df1abc..6dd37c8 100644 --- a/actions-workflow-parser/testdata/reader/errors-reusable-workflow-permissions-not-allowed-request-repository-projects-write.yml +++ b/actions-workflow-parser/testdata/reader/errors-reusable-workflow-permissions-not-allowed-request-repository-projects-write.yml @@ -1,7 +1,6 @@ include-source: false # Drop file/line/col from output skip: - Go - - TypeScript permissions-policy: LimitedRead --- on: push diff --git a/actions-workflow-parser/testdata/reader/errors-reusable-workflow-permissions-not-allowed-request-security-events-write.yml b/actions-workflow-parser/testdata/reader/errors-reusable-workflow-permissions-not-allowed-request-security-events-write.yml index d7081ae..c6dc1a6 100644 --- a/actions-workflow-parser/testdata/reader/errors-reusable-workflow-permissions-not-allowed-request-security-events-write.yml +++ b/actions-workflow-parser/testdata/reader/errors-reusable-workflow-permissions-not-allowed-request-security-events-write.yml @@ -1,7 +1,6 @@ include-source: false # Drop file/line/col from output skip: - Go - - TypeScript permissions-policy: LimitedRead --- on: push diff --git a/actions-workflow-parser/testdata/reader/errors-reusable-workflow-permissions-not-allowed-request-statuses-write.yml b/actions-workflow-parser/testdata/reader/errors-reusable-workflow-permissions-not-allowed-request-statuses-write.yml index 2aebcc9..dd2b3fd 100644 --- a/actions-workflow-parser/testdata/reader/errors-reusable-workflow-permissions-not-allowed-request-statuses-write.yml +++ b/actions-workflow-parser/testdata/reader/errors-reusable-workflow-permissions-not-allowed-request-statuses-write.yml @@ -1,7 +1,6 @@ include-source: false # Drop file/line/col from output skip: - Go - - TypeScript permissions-policy: LimitedRead --- on: push diff --git a/actions-workflow-parser/testdata/reader/errors-reusable-workflow-permissions-not-allowed-request-write-all-allowed-none.yml b/actions-workflow-parser/testdata/reader/errors-reusable-workflow-permissions-not-allowed-request-write-all-allowed-none.yml index 98a4844..bd52f88 100644 --- a/actions-workflow-parser/testdata/reader/errors-reusable-workflow-permissions-not-allowed-request-write-all-allowed-none.yml +++ b/actions-workflow-parser/testdata/reader/errors-reusable-workflow-permissions-not-allowed-request-write-all-allowed-none.yml @@ -1,7 +1,6 @@ include-source: false # Drop file/line/col from output skip: - Go - - TypeScript permissions-policy: LimitedRead # Note, the workflow names are intentionally short so the error message doesn't get truncated too much --- diff --git a/actions-workflow-parser/testdata/reader/errors-reusable-workflow-permissions-not-allowed-request-write-all-allowed-read-all.yml b/actions-workflow-parser/testdata/reader/errors-reusable-workflow-permissions-not-allowed-request-write-all-allowed-read-all.yml index 9d5ca02..22fd8c4 100644 --- a/actions-workflow-parser/testdata/reader/errors-reusable-workflow-permissions-not-allowed-request-write-all-allowed-read-all.yml +++ b/actions-workflow-parser/testdata/reader/errors-reusable-workflow-permissions-not-allowed-request-write-all-allowed-read-all.yml @@ -1,7 +1,6 @@ include-source: false # Drop file/line/col from output skip: - Go - - TypeScript permissions-policy: LimitedRead # Note, the workflow names are intentionally short so the error message doesn't get truncated too much --- diff --git a/actions-workflow-parser/testdata/reader/errors-reusable-workflow-permissions-not-allowed-workflow-level-from-caller-default.yml b/actions-workflow-parser/testdata/reader/errors-reusable-workflow-permissions-not-allowed-workflow-level-from-caller-default.yml index 67ba05a..162700b 100644 --- a/actions-workflow-parser/testdata/reader/errors-reusable-workflow-permissions-not-allowed-workflow-level-from-caller-default.yml +++ b/actions-workflow-parser/testdata/reader/errors-reusable-workflow-permissions-not-allowed-workflow-level-from-caller-default.yml @@ -1,7 +1,6 @@ include-source: false # Drop file/line/col from output skip: - Go - - TypeScript permissions-policy: LimitedRead --- on: push @@ -14,6 +13,8 @@ contoso/templates/.github/workflows/deploy.yml@v1 on: workflow_call permissions: actions: write + contents: write + packages: write jobs: deploy: runs-on: ubuntu-latest @@ -23,7 +24,7 @@ jobs: { "errors": [ { - "Message": ".github/workflows/errors-reusable-workflow-permissions-not-allowed-workflow-level-from-caller-default.yml (Line: 3, Col: 3): Error calling workflow 'contoso/templates/.github/workflows/deploy.yml@v1'. The workflow 'contoso/templates/.github/workflows/deploy.yml@v1' is requesting 'actions: write', but is only allowed 'actions: none'." + "Message": ".github/workflows/errors-reusable-workflow-permissions-not-allowed-workflow-level-from-caller-default.yml (Line: 3, Col: 3): Error calling workflow 'contoso/templates/.github/workflows/deploy.yml@v1'. The workflow 'contoso/templates/.github/workflows/deploy.yml@v1' is requesting 'actions: write, contents: write, packages: write', but is only allowed 'actions: none, contents: read, packages: read'." } ] } diff --git a/actions-workflow-parser/testdata/reader/errors-reusable-workflow-permissions-not-allowed-workflow-level-from-caller-job-level.yml b/actions-workflow-parser/testdata/reader/errors-reusable-workflow-permissions-not-allowed-workflow-level-from-caller-job-level.yml index 61865f7..2ac2408 100644 --- a/actions-workflow-parser/testdata/reader/errors-reusable-workflow-permissions-not-allowed-workflow-level-from-caller-job-level.yml +++ b/actions-workflow-parser/testdata/reader/errors-reusable-workflow-permissions-not-allowed-workflow-level-from-caller-job-level.yml @@ -1,7 +1,6 @@ include-source: false # Drop file/line/col from output skip: - Go - - TypeScript --- on: push jobs: diff --git a/actions-workflow-parser/testdata/reader/errors-reusable-workflow-permissions-not-allowed-workflow-level-from-caller-workflow-level.yml b/actions-workflow-parser/testdata/reader/errors-reusable-workflow-permissions-not-allowed-workflow-level-from-caller-workflow-level.yml index b414ccb..eaa04c1 100644 --- a/actions-workflow-parser/testdata/reader/errors-reusable-workflow-permissions-not-allowed-workflow-level-from-caller-workflow-level.yml +++ b/actions-workflow-parser/testdata/reader/errors-reusable-workflow-permissions-not-allowed-workflow-level-from-caller-workflow-level.yml @@ -1,7 +1,6 @@ include-source: false # Drop file/line/col from output skip: - Go - - TypeScript --- on: push permissions: diff --git a/actions-workflow-parser/testdata/reader/errors-step-id.yml b/actions-workflow-parser/testdata/reader/errors-step-id.yml index d980321..f36cfd3 100644 --- a/actions-workflow-parser/testdata/reader/errors-step-id.yml +++ b/actions-workflow-parser/testdata/reader/errors-step-id.yml @@ -1,6 +1,4 @@ include-source: false # Drop file/line/col from output -skip: - - TypeScript --- name: CI on: diff --git a/actions-workflow-parser/testdata/reader/errors-step-run-exceeds-length.yml b/actions-workflow-parser/testdata/reader/errors-step-run-exceeds-length.yml index 8933371..bf0a55a 100644 --- a/actions-workflow-parser/testdata/reader/errors-step-run-exceeds-length.yml +++ b/actions-workflow-parser/testdata/reader/errors-step-run-exceeds-length.yml @@ -1,7 +1,6 @@ include-source: false # Drop file/line/col from output skip: - Go - - TypeScript --- on: push jobs: diff --git a/actions-workflow-parser/testdata/reader/errors-step-uses-syntax.yml b/actions-workflow-parser/testdata/reader/errors-step-uses-syntax.yml index 3b244e2..b840137 100644 --- a/actions-workflow-parser/testdata/reader/errors-step-uses-syntax.yml +++ b/actions-workflow-parser/testdata/reader/errors-step-uses-syntax.yml @@ -1,6 +1,4 @@ include-source: false # Drop file/line/col from output -skip: - - TypeScript --- on: push jobs: diff --git a/actions-workflow-parser/testdata/reader/escape-html-values.yml b/actions-workflow-parser/testdata/reader/escape-html-values.yml index 2fb679a..69900a5 100644 --- a/actions-workflow-parser/testdata/reader/escape-html-values.yml +++ b/actions-workflow-parser/testdata/reader/escape-html-values.yml @@ -1,6 +1,4 @@ include-source: false # Drop file/line/col from output -skip: - - TypeScript --- on: push env: diff --git a/actions-workflow-parser/testdata/reader/float-folded-style.yml b/actions-workflow-parser/testdata/reader/float-folded-style.yml index bd28b60..f3fdb4d 100644 --- a/actions-workflow-parser/testdata/reader/float-folded-style.yml +++ b/actions-workflow-parser/testdata/reader/float-folded-style.yml @@ -1,6 +1,4 @@ include-source: false # Drop file/line/col from output -skip: - - TypeScript --- on: push jobs: diff --git a/actions-workflow-parser/testdata/reader/is-partial-rerun.yml b/actions-workflow-parser/testdata/reader/is-partial-rerun.yml new file mode 100644 index 0000000..67fe514 --- /dev/null +++ b/actions-workflow-parser/testdata/reader/is-partial-rerun.yml @@ -0,0 +1,166 @@ + +# Remove this test when feature flag Actions.FixFileTableOrderOnPartialRerun is rolled out +# +# This test exploits the fact that the test-referenced-workflows-dictionary is sorted. +# When IsPartialRerun=true, the file table is re-written using the keys from the +# test-referenced-workflows-dictionary. + +include-source: true # Preserve file/line/col from output +skip: + - Go +is-partial-rerun: true +--- +on: push +jobs: + build: + runs-on: ubuntu-latest + steps: + - run: echo hi + deploy-1: + needs: build + uses: .contoso/templates/.github/workflows/deploy.yml@v1 +--- +.contoso/templates/.github/workflows/deploy.yml@v1 +--- +on: workflow_call +jobs: + job1: + runs-on: ubuntu-latest + steps: + - run: echo hi from reusable workflow +--- +{ + "jobs": [ + { + "type": "job", + "id": { + "type": 0, + "file": 1, + "line": 3, + "col": 3, + "lit": "build" + }, + "name": { + "type": 0, + "file": 1, + "line": 3, + "col": 3, + "lit": "build" + }, + "if": { + "type": 3, + "expr": "success()" + }, + "runs-on": { + "type": 0, + "file": 1, + "line": 4, + "col": 14, + "lit": "ubuntu-latest" + }, + "steps": [ + { + "id": "__run", + "if": { + "type": 3, + "expr": "success()" + }, + "run": { + "type": 0, + "file": 1, + "line": 6, + "col": 14, + "lit": "echo hi" + } + } + ] + }, + { + "type": "reusableWorkflowJob", + "id": { + "type": 0, + "file": 1, + "line": 7, + "col": 3, + "lit": "deploy-1" + }, + "name": { + "type": 0, + "file": 1, + "line": 7, + "col": 3, + "lit": "deploy-1" + }, + "needs": [ + { + "type": 0, + "file": 1, + "line": 8, + "col": 12, + "lit": "build" + } + ], + "if": { + "type": 3, + "expr": "success()" + }, + "ref": { + "type": 0, + "file": 1, + "line": 9, + "col": 11, + "lit": ".contoso/templates/.github/workflows/deploy.yml@v1" + }, + "jobs": [ + { + "type": "job", + "id": { + "type": 0, + "file": 2, + "line": 3, + "col": 3, + "lit": "job1" + }, + "name": { + "type": 0, + "file": 2, + "line": 3, + "col": 3, + "lit": "job1" + }, + "if": { + "type": 3, + "expr": "success()" + }, + "runs-on": { + "type": 0, + "file": 2, + "line": 4, + "col": 14, + "lit": "ubuntu-latest" + }, + "steps": [ + { + "id": "__run", + "if": { + "type": 3, + "expr": "success()" + }, + "run": { + "type": 0, + "file": 2, + "line": 6, + "col": 14, + "lit": "echo hi from reusable workflow" + } + } + ] + } + ] + } + ], + "file-table": [ + ".contoso/templates/.github/workflows/deploy.yml@v1", + ".github/workflows/is-partial-rerun.yml" + ] +} diff --git a/actions-workflow-parser/testdata/reader/job-basic.yml b/actions-workflow-parser/testdata/reader/job-basic.yml index 824c814..581d9c8 100644 --- a/actions-workflow-parser/testdata/reader/job-basic.yml +++ b/actions-workflow-parser/testdata/reader/job-basic.yml @@ -1,6 +1,4 @@ include-source: false # Drop file/line/col from output -skip: - - TypeScript --- on: push jobs: diff --git a/actions-workflow-parser/testdata/reader/job-cancel-timeout-minutes.yml b/actions-workflow-parser/testdata/reader/job-cancel-timeout-minutes.yml index 632dc91..462eb7a 100644 --- a/actions-workflow-parser/testdata/reader/job-cancel-timeout-minutes.yml +++ b/actions-workflow-parser/testdata/reader/job-cancel-timeout-minutes.yml @@ -1,7 +1,6 @@ include-source: false # Drop file/line/col from output skip: - Go - - TypeScript --- on: push jobs: diff --git a/actions-workflow-parser/testdata/reader/job-concurrency.yml b/actions-workflow-parser/testdata/reader/job-concurrency.yml index 4a9d711..ba8e59f 100644 --- a/actions-workflow-parser/testdata/reader/job-concurrency.yml +++ b/actions-workflow-parser/testdata/reader/job-concurrency.yml @@ -1,7 +1,6 @@ include-source: false # Drop file/line/col from output skip: - Go - - TypeScript --- on: push jobs: diff --git a/actions-workflow-parser/testdata/reader/job-continue-on-error.yml b/actions-workflow-parser/testdata/reader/job-continue-on-error.yml index 6a09af9..cd54490 100644 --- a/actions-workflow-parser/testdata/reader/job-continue-on-error.yml +++ b/actions-workflow-parser/testdata/reader/job-continue-on-error.yml @@ -1,7 +1,6 @@ include-source: false # Drop file/line/col from output skip: - Go - - TypeScript --- on: push jobs: diff --git a/actions-workflow-parser/testdata/reader/job-defaults.yml b/actions-workflow-parser/testdata/reader/job-defaults.yml index 25e99dd..76bf9b3 100644 --- a/actions-workflow-parser/testdata/reader/job-defaults.yml +++ b/actions-workflow-parser/testdata/reader/job-defaults.yml @@ -1,6 +1,4 @@ include-source: false # Drop file/line/col from output -skip: - - TypeScript --- on: push jobs: diff --git a/actions-workflow-parser/testdata/reader/job-if.yml b/actions-workflow-parser/testdata/reader/job-if.yml index ef715cf..caf7c5a 100644 --- a/actions-workflow-parser/testdata/reader/job-if.yml +++ b/actions-workflow-parser/testdata/reader/job-if.yml @@ -1,6 +1,4 @@ include-source: false # Drop file/line/col from output -skip: - - TypeScript --- on: push env: diff --git a/actions-workflow-parser/testdata/reader/job-permissions.yml b/actions-workflow-parser/testdata/reader/job-permissions.yml index df3095c..d5aab8f 100644 --- a/actions-workflow-parser/testdata/reader/job-permissions.yml +++ b/actions-workflow-parser/testdata/reader/job-permissions.yml @@ -1,6 +1,4 @@ include-source: false # Drop file/line/col from output -skip: - - TypeScript --- on: push permissions: diff --git a/actions-workflow-parser/testdata/reader/job-runs-on.yml b/actions-workflow-parser/testdata/reader/job-runs-on.yml index c774191..85023b8 100644 --- a/actions-workflow-parser/testdata/reader/job-runs-on.yml +++ b/actions-workflow-parser/testdata/reader/job-runs-on.yml @@ -52,6 +52,10 @@ jobs: - label 2 steps: - run: echo hi + build8: + runs-on: [ inf, -inf, +inf, infinity, NaN, nan, -infinity ] # flow sequence, inf and nan keywords + steps: + - run: echo hi --- { "jobs": [ @@ -290,6 +294,37 @@ jobs: "run": "echo hi" } ] + }, + { + "type": "job", + "id": "build8", + "name": "build8", + "if": { + "type": 3, + "expr": "success()" + }, + "runs-on": { + "type": 1, + "seq": [ + "inf", + "-inf", + "+inf", + "infinity", + "NaN", + "nan", + "-infinity" + ] + }, + "steps": [ + { + "id": "__run", + "if": { + "type": 3, + "expr": "success()" + }, + "run": "echo hi" + } + ] } ] } diff --git a/actions-workflow-parser/testdata/reader/job-timeout-minutes.yml b/actions-workflow-parser/testdata/reader/job-timeout-minutes.yml index f6c7b76..61b474d 100644 --- a/actions-workflow-parser/testdata/reader/job-timeout-minutes.yml +++ b/actions-workflow-parser/testdata/reader/job-timeout-minutes.yml @@ -1,7 +1,6 @@ include-source: false # Drop file/line/col from output skip: - Go - - TypeScript --- on: push jobs: diff --git a/actions-workflow-parser/testdata/reader/matrix-basic.yml b/actions-workflow-parser/testdata/reader/matrix-basic.yml index d6f1e91..f8738d1 100644 --- a/actions-workflow-parser/testdata/reader/matrix-basic.yml +++ b/actions-workflow-parser/testdata/reader/matrix-basic.yml @@ -1,6 +1,4 @@ include-source: false # Drop file/line/col from output -skip: - - TypeScript --- on: push jobs: diff --git a/actions-workflow-parser/testdata/reader/max-result-size.yml b/actions-workflow-parser/testdata/reader/max-result-size.yml new file mode 100644 index 0000000..4b52a21 --- /dev/null +++ b/actions-workflow-parser/testdata/reader/max-result-size.yml @@ -0,0 +1,52 @@ +include-source: false # Drop file/line/col from output +max-result-size: 1128 +--- +on: push +jobs: + job1: + runs-on: ubuntu-latest + steps: + - run: echo Deploying 1... + - run: echo Deploying 2... + - run: echo Deploying 3... +--- +{ + "jobs": [ + { + "type": "job", + "id": "job1", + "name": "job1", + "if": { + "type": 3, + "expr": "success()" + }, + "runs-on": "ubuntu-latest", + "steps": [ + { + "id": "__run", + "if": { + "type": 3, + "expr": "success()" + }, + "run": "echo Deploying 1..." + }, + { + "id": "__run_2", + "if": { + "type": 3, + "expr": "success()" + }, + "run": "echo Deploying 2..." + }, + { + "id": "__run_3", + "if": { + "type": 3, + "expr": "success()" + }, + "run": "echo Deploying 3..." + } + ] + } + ] +} \ No newline at end of file diff --git a/actions-workflow-parser/testdata/reader/misc-jobs.yml b/actions-workflow-parser/testdata/reader/misc-jobs.yml index 417c527..0a35e11 100644 --- a/actions-workflow-parser/testdata/reader/misc-jobs.yml +++ b/actions-workflow-parser/testdata/reader/misc-jobs.yml @@ -1,6 +1,4 @@ include-source: false # Drop file/line/col from output -skip: - - TypeScript --- on: push jobs: diff --git a/actions-workflow-parser/testdata/reader/misc-steps.yml b/actions-workflow-parser/testdata/reader/misc-steps.yml index b75efd8..9625212 100644 --- a/actions-workflow-parser/testdata/reader/misc-steps.yml +++ b/actions-workflow-parser/testdata/reader/misc-steps.yml @@ -1,6 +1,4 @@ include-source: false # Drop file/line/col from output -skip: - - TypeScript --- on: push jobs: diff --git a/actions-workflow-parser/testdata/reader/mvp.yml b/actions-workflow-parser/testdata/reader/mvp.yml index 417ef36..4276ec5 100644 --- a/actions-workflow-parser/testdata/reader/mvp.yml +++ b/actions-workflow-parser/testdata/reader/mvp.yml @@ -1,6 +1,4 @@ include-source: false # Drop file/line/col from output -skip: - - TypeScript --- # This is a basic workflow to help you get started with Actions diff --git a/actions-workflow-parser/testdata/reader/on-workflow_dispatch-inputs-null.yml b/actions-workflow-parser/testdata/reader/on-workflow_dispatch-inputs-null.yml index f65c6b2..2da51d0 100644 --- a/actions-workflow-parser/testdata/reader/on-workflow_dispatch-inputs-null.yml +++ b/actions-workflow-parser/testdata/reader/on-workflow_dispatch-inputs-null.yml @@ -1,6 +1,4 @@ include-source: false # Drop file/line/col from output -skip: - - TypeScript --- on: workflow_dispatch: diff --git a/actions-workflow-parser/testdata/reader/on-workflow_dispatch-inputs.yml b/actions-workflow-parser/testdata/reader/on-workflow_dispatch-inputs.yml index b97e1f1..a48e261 100644 --- a/actions-workflow-parser/testdata/reader/on-workflow_dispatch-inputs.yml +++ b/actions-workflow-parser/testdata/reader/on-workflow_dispatch-inputs.yml @@ -1,6 +1,4 @@ include-source: false # Drop file/line/col from output -skip: - - TypeScript --- on: workflow_dispatch: diff --git a/actions-workflow-parser/testdata/reader/on-workflow_dispatch-unknown-keys-ignored.yml b/actions-workflow-parser/testdata/reader/on-workflow_dispatch-unknown-keys-ignored.yml index ee2019a..0d222e4 100644 --- a/actions-workflow-parser/testdata/reader/on-workflow_dispatch-unknown-keys-ignored.yml +++ b/actions-workflow-parser/testdata/reader/on-workflow_dispatch-unknown-keys-ignored.yml @@ -1,6 +1,4 @@ include-source: false # Drop file/line/col from output -skip: - - TypeScript --- on: workflow_dispatch: diff --git a/actions-workflow-parser/testdata/reader/permissions.yml b/actions-workflow-parser/testdata/reader/permissions.yml index df6f689..8d9d828 100644 --- a/actions-workflow-parser/testdata/reader/permissions.yml +++ b/actions-workflow-parser/testdata/reader/permissions.yml @@ -1,6 +1,4 @@ include-source: false # Drop file/line/col from output -skip: - - TypeScript --- on: push permissions: diff --git a/actions-workflow-parser/testdata/reader/preserves-source-info-basic.yml b/actions-workflow-parser/testdata/reader/preserves-source-info-basic.yml index 9c16081..ca7749f 100644 --- a/actions-workflow-parser/testdata/reader/preserves-source-info-basic.yml +++ b/actions-workflow-parser/testdata/reader/preserves-source-info-basic.yml @@ -1,6 +1,4 @@ include-source: true # Preserve file/line/col in serialized output -skip: - - TypeScript --- on: push jobs: diff --git a/actions-workflow-parser/testdata/reader/preserves-source-info-reusable-workflow.yml b/actions-workflow-parser/testdata/reader/preserves-source-info-reusable-workflow.yml index acf4c70..c4e9003 100644 --- a/actions-workflow-parser/testdata/reader/preserves-source-info-reusable-workflow.yml +++ b/actions-workflow-parser/testdata/reader/preserves-source-info-reusable-workflow.yml @@ -1,7 +1,4 @@ include-source: true # Preserve file/line/col in serialized output -skip: - - Go - - TypeScript --- on: push jobs: diff --git a/actions-workflow-parser/testdata/reader/preserves-source-info-simple.yml b/actions-workflow-parser/testdata/reader/preserves-source-info-simple.yml index 75303ce..2f525af 100644 --- a/actions-workflow-parser/testdata/reader/preserves-source-info-simple.yml +++ b/actions-workflow-parser/testdata/reader/preserves-source-info-simple.yml @@ -1,6 +1,4 @@ include-source: true # Preserve file/line/col in serialized output -skip: - - TypeScript --- # This is meant to cover all the different types of TemplateToken that are output # with include-source: true. Currently it is missing type 4 (insert expression) diff --git a/actions-workflow-parser/testdata/reader/reusable-workflow-job-mvp.yml b/actions-workflow-parser/testdata/reader/reusable-workflow-job-mvp.yml new file mode 100644 index 0000000..b899b02 --- /dev/null +++ b/actions-workflow-parser/testdata/reader/reusable-workflow-job-mvp.yml @@ -0,0 +1,54 @@ +include-source: false # Drop file/line/col from output +--- +on: push +jobs: + call_reusable: + uses: contoso/templates/.github/workflows/deploy.yml@v1 +--- +contoso/templates/.github/workflows/deploy.yml@v1 +--- +on: + workflow_call: +jobs: + simple_job: + runs-on: ubuntu-latest + steps: + - run: echo Hello +--- +{ + "jobs": [ + { + "type": "reusableWorkflowJob", + "id": "call_reusable", + "name": "call_reusable", + "needs": [], + "if": { + "type": 3, + "expr": "success()" + }, + "ref": "contoso/templates/.github/workflows/deploy.yml@v1", + "jobs": [ + { + "type": "job", + "id": "simple_job", + "name": "simple_job", + "if": { + "type": 3, + "expr": "success()" + }, + "runs-on": "ubuntu-latest", + "steps": [ + { + "id": "__run", + "if": { + "type": 3, + "expr": "success()" + }, + "run": "echo Hello" + } + ] + } + ] + } + ] +} diff --git a/actions-workflow-parser/testdata/reader/reusable-workflow-job-name.yml b/actions-workflow-parser/testdata/reader/reusable-workflow-job-name.yml index 3e67c56..f82bd18 100644 --- a/actions-workflow-parser/testdata/reader/reusable-workflow-job-name.yml +++ b/actions-workflow-parser/testdata/reader/reusable-workflow-job-name.yml @@ -1,6 +1,4 @@ include-source: false # Drop file/line/col from output -skip: - - Go --- on: push jobs: diff --git a/actions-workflow-parser/testdata/reader/reusable-workflow-job-nested-basic.yml b/actions-workflow-parser/testdata/reader/reusable-workflow-job-nested-basic.yml index ec93258..144b28c 100644 --- a/actions-workflow-parser/testdata/reader/reusable-workflow-job-nested-basic.yml +++ b/actions-workflow-parser/testdata/reader/reusable-workflow-job-nested-basic.yml @@ -1,7 +1,6 @@ include-source: false # Drop file/line/col from output skip: - Go - - TypeScript max-nested-reusable-workflows-depth: 2 --- on: push diff --git a/actions-workflow-parser/testdata/reader/reusable-workflow-job-nested-multiple.yml b/actions-workflow-parser/testdata/reader/reusable-workflow-job-nested-multiple.yml index de28ff1..8199cf1 100644 --- a/actions-workflow-parser/testdata/reader/reusable-workflow-job-nested-multiple.yml +++ b/actions-workflow-parser/testdata/reader/reusable-workflow-job-nested-multiple.yml @@ -1,7 +1,6 @@ include-source: false # Drop file/line/col from output skip: - Go - - TypeScript max-nested-reusable-workflows-depth: 2 --- on: push diff --git a/actions-workflow-parser/testdata/reader/reusable-workflow-job-nested-permissions.yml b/actions-workflow-parser/testdata/reader/reusable-workflow-job-nested-permissions.yml index 773dd93..2d0c4e2 100644 --- a/actions-workflow-parser/testdata/reader/reusable-workflow-job-nested-permissions.yml +++ b/actions-workflow-parser/testdata/reader/reusable-workflow-job-nested-permissions.yml @@ -1,7 +1,6 @@ include-source: false # Drop file/line/col from output skip: - Go - - TypeScript max-nested-reusable-workflows-depth: 3 --- on: push diff --git a/actions-workflow-parser/testdata/reader/reusable-workflow-job-permissions-default-limited-read-allows-contents-packages.yml b/actions-workflow-parser/testdata/reader/reusable-workflow-job-permissions-default-limited-read-allows-contents-packages.yml new file mode 100644 index 0000000..af5cc23 --- /dev/null +++ b/actions-workflow-parser/testdata/reader/reusable-workflow-job-permissions-default-limited-read-allows-contents-packages.yml @@ -0,0 +1,68 @@ +include-source: false # Drop file/line/col from output +skip: + - Go +permissions-policy: LimitedRead +--- +on: push +jobs: + # Inherit from default permissions policy + build: + uses: contoso/templates/.github/workflows/build.yml@v1 +--- +contoso/templates/.github/workflows/build.yml@v1 +--- +permissions: + contents: read + packages: read +on: workflow_call +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - run: echo 1 +--- +{ + "jobs": [ + { + "type": "reusableWorkflowJob", + "id": "build", + "name": "build", + "needs": [], + "if": { + "type": 3, + "expr": "success()" + }, + "ref": "contoso/templates/.github/workflows/build.yml@v1", + "permissions": { + "contents": "read", + "packages": "read" + }, + "jobs": [ + { + "type": "job", + "id": "deploy", + "name": "deploy", + "if": { + "type": 3, + "expr": "success()" + }, + "permissions": { + "contents": "read", + "packages": "read" + }, + "runs-on": "ubuntu-latest", + "steps": [ + { + "id": "__run", + "if": { + "type": 3, + "expr": "success()" + }, + "run": "echo 1" + } + ] + } + ] + } + ] +} diff --git a/actions-workflow-parser/testdata/reader/reusable-workflow-job-permissions-embedded-permissions-after-jobs.yml b/actions-workflow-parser/testdata/reader/reusable-workflow-job-permissions-embedded-permissions-after-jobs.yml index e613903..2c6b906 100644 --- a/actions-workflow-parser/testdata/reader/reusable-workflow-job-permissions-embedded-permissions-after-jobs.yml +++ b/actions-workflow-parser/testdata/reader/reusable-workflow-job-permissions-embedded-permissions-after-jobs.yml @@ -1,7 +1,6 @@ include-source: false # Drop file/line/col from output skip: - Go - - TypeScript permissions-policy: LimitedRead --- on: push diff --git a/actions-workflow-parser/testdata/reader/reusable-workflow-job-permissions-embedded-permissions.yml b/actions-workflow-parser/testdata/reader/reusable-workflow-job-permissions-embedded-permissions.yml index 47ce8d1..d98c9d8 100644 --- a/actions-workflow-parser/testdata/reader/reusable-workflow-job-permissions-embedded-permissions.yml +++ b/actions-workflow-parser/testdata/reader/reusable-workflow-job-permissions-embedded-permissions.yml @@ -1,7 +1,6 @@ include-source: false # Drop file/line/col from output skip: - Go - - TypeScript permissions-policy: LimitedRead --- on: push diff --git a/actions-workflow-parser/testdata/reader/reusable-workflow-job-permissions-overrides-default-limited-read.yml b/actions-workflow-parser/testdata/reader/reusable-workflow-job-permissions-overrides-default-limited-read.yml index d6fb3b6..bbf0a99 100644 --- a/actions-workflow-parser/testdata/reader/reusable-workflow-job-permissions-overrides-default-limited-read.yml +++ b/actions-workflow-parser/testdata/reader/reusable-workflow-job-permissions-overrides-default-limited-read.yml @@ -1,7 +1,6 @@ include-source: false # Drop file/line/col from output skip: - Go - - TypeScript permissions-policy: LimitedRead --- on: push diff --git a/actions-workflow-parser/testdata/reader/reusable-workflow-job-permissions-overrides-default-write.yml b/actions-workflow-parser/testdata/reader/reusable-workflow-job-permissions-overrides-default-write.yml new file mode 100644 index 0000000..ca3659b --- /dev/null +++ b/actions-workflow-parser/testdata/reader/reusable-workflow-job-permissions-overrides-default-write.yml @@ -0,0 +1,101 @@ +include-source: false # Drop file/line/col from output +skip: + - Go +permissions-policy: Write +--- +on: push +jobs: + # Inherit from default permissions policy + build: + uses: contoso/templates/.github/workflows/build.yml@v1 + # Override + build2: + permissions: + actions: write + uses: contoso/templates/.github/workflows/build.yml@v1 +--- +contoso/templates/.github/workflows/build.yml@v1 +--- +on: workflow_call +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - run: echo 1 +--- +{ + "jobs": [ + { + "type": "reusableWorkflowJob", + "id": "build", + "name": "build", + "needs": [], + "if": { + "type": 3, + "expr": "success()" + }, + "ref": "contoso/templates/.github/workflows/build.yml@v1", + "jobs": [ + { + "type": "job", + "id": "deploy", + "name": "deploy", + "if": { + "type": 3, + "expr": "success()" + }, + "runs-on": "ubuntu-latest", + "steps": [ + { + "id": "__run", + "if": { + "type": 3, + "expr": "success()" + }, + "run": "echo 1" + } + ] + } + ] + }, + { + "type": "reusableWorkflowJob", + "id": "build2", + "name": "build2", + "needs": [], + "if": { + "type": 3, + "expr": "success()" + }, + "ref": "contoso/templates/.github/workflows/build.yml@v1", + "permissions": { + "actions": "write" + }, + "jobs": [ + { + "type": "job", + "id": "deploy", + "name": "deploy", + "if": { + "type": 3, + "expr": "success()" + }, + "permissions": { + "actions": "write" + }, + "runs-on": "ubuntu-latest", + "steps": [ + { + "id": "__run", + "if": { + "type": 3, + "expr": "success()" + }, + "run": "echo 1" + } + ] + } + ] + } + ] +} diff --git a/actions-workflow-parser/testdata/reader/reusable-workflow-job-permissions-overrides-workflow-level.yml b/actions-workflow-parser/testdata/reader/reusable-workflow-job-permissions-overrides-workflow-level.yml index 7f096d0..d724692 100644 --- a/actions-workflow-parser/testdata/reader/reusable-workflow-job-permissions-overrides-workflow-level.yml +++ b/actions-workflow-parser/testdata/reader/reusable-workflow-job-permissions-overrides-workflow-level.yml @@ -1,7 +1,6 @@ include-source: false # Drop file/line/col from output skip: - Go - - TypeScript permissions-policy: LimitedRead --- on: push diff --git a/actions-workflow-parser/testdata/reader/reusable-workflow-multiple.yml b/actions-workflow-parser/testdata/reader/reusable-workflow-multiple.yml index d129cdb..3066790 100644 --- a/actions-workflow-parser/testdata/reader/reusable-workflow-multiple.yml +++ b/actions-workflow-parser/testdata/reader/reusable-workflow-multiple.yml @@ -1,6 +1,4 @@ include-source: false # Drop file/line/col from output -skip: - - Go --- on: push jobs: diff --git a/actions-workflow-parser/testdata/reader/reusable-workflow-no-inputs.yml b/actions-workflow-parser/testdata/reader/reusable-workflow-no-inputs.yml index e07bb6b..65b4b2e 100644 --- a/actions-workflow-parser/testdata/reader/reusable-workflow-no-inputs.yml +++ b/actions-workflow-parser/testdata/reader/reusable-workflow-no-inputs.yml @@ -1,6 +1,4 @@ include-source: false # Drop file/line/col from output -skip: - - Go --- on: push jobs: diff --git a/actions-workflow-parser/testdata/reader/root-env-defaults.yml b/actions-workflow-parser/testdata/reader/root-env-defaults.yml index 5b19c66..f696886 100644 --- a/actions-workflow-parser/testdata/reader/root-env-defaults.yml +++ b/actions-workflow-parser/testdata/reader/root-env-defaults.yml @@ -1,6 +1,4 @@ include-source: false # Drop file/line/col from output -skip: - - TypeScript --- on: push env: diff --git a/actions-workflow-parser/testdata/reader/scientific-notation-number.yml b/actions-workflow-parser/testdata/reader/scientific-notation-number.yml new file mode 100644 index 0000000..b3a25aa --- /dev/null +++ b/actions-workflow-parser/testdata/reader/scientific-notation-number.yml @@ -0,0 +1,79 @@ +include-source: false # Drop file/line/col from output +--- +on: push +jobs: + build: + runs-on: ubuntu-latest + steps: + - run: echo Value Difference! + env: + MIN: 1345678912345678912 + max-double: + runs-on: ubuntu-latest + steps: + - run: echo Value Difference! + env: + MIN: 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +--- +{ + "jobs": [ + { + "type": "job", + "id": "build", + "name": "build", + "if": { + "type": 3, + "expr": "success()" + }, + "runs-on": "ubuntu-latest", + "steps": [ + { + "id": "__run", + "if": { + "type": 3, + "expr": "success()" + }, + "env": { + "type": 2, + "map": [ + { + "Key": "MIN", + "Value": "1.34567891234568E+18" + } + ] + }, + "run": "echo Value Difference!" + } + ] + }, + { + "type": "job", + "id": "max-double", + "name": "max-double", + "if": { + "type": 3, + "expr": "success()" + }, + "runs-on": "ubuntu-latest", + "steps": [ + { + "id": "__run", + "if": { + "type": 3, + "expr": "success()" + }, + "env": { + "type": 2, + "map": [ + { + "Key": "MIN", + "Value": "1.79769313486232E+308" + } + ] + }, + "run": "echo Value Difference!" + } + ] + } + ] +} \ No newline at end of file diff --git a/actions-workflow-parser/testdata/reader/skip-reusable-workflows.yml b/actions-workflow-parser/testdata/reader/skip-reusable-workflows.yml new file mode 100644 index 0000000..31d6a37 --- /dev/null +++ b/actions-workflow-parser/testdata/reader/skip-reusable-workflows.yml @@ -0,0 +1,113 @@ +include-source: true # Preserve file/line/col from output +skip: + - Go +skip-reusable-workflows: true # Only supported by C# parser +--- +on: push +jobs: + build: + runs-on: ubuntu-latest + steps: + - run: echo hi + deploy-1: + needs: build + uses: contoso/templates/.github/workflows/deploy.yml@v1 +--- +contoso/templates/.github/workflows/deploy.yml@v1 +--- +on: workflow_call +jobs: + job1: + runs-on: ubuntu-latest + steps: + - run: echo hi from reusable workflow +--- +{ + "jobs": [ + { + "type": "job", + "id": { + "type": 0, + "file": 1, + "line": 3, + "col": 3, + "lit": "build" + }, + "name": { + "type": 0, + "file": 1, + "line": 3, + "col": 3, + "lit": "build" + }, + "if": { + "type": 3, + "expr": "success()" + }, + "runs-on": { + "type": 0, + "file": 1, + "line": 4, + "col": 14, + "lit": "ubuntu-latest" + }, + "steps": [ + { + "id": "__run", + "if": { + "type": 3, + "expr": "success()" + }, + "run": { + "type": 0, + "file": 1, + "line": 6, + "col": 14, + "lit": "echo hi" + } + } + ] + }, + { + "type": "reusableWorkflowJob", + "id": { + "type": 0, + "file": 1, + "line": 7, + "col": 3, + "lit": "deploy-1" + }, + "name": { + "type": 0, + "file": 1, + "line": 7, + "col": 3, + "lit": "deploy-1" + }, + "needs": [ + { + "type": 0, + "file": 1, + "line": 8, + "col": 12, + "lit": "build" + } + ], + "if": { + "type": 3, + "expr": "success()" + }, + "ref": { + "type": 0, + "file": 1, + "line": 9, + "col": 11, + "lit": "contoso/templates/.github/workflows/deploy.yml@v1" + }, + "jobs": [] + } + ], + "file-table": [ + ".github/workflows/skip-reusable-workflows.yml" + ] +} diff --git a/actions-workflow-parser/testdata/reader/step-if.yml b/actions-workflow-parser/testdata/reader/step-if.yml index ffbaf89..4aafc71 100644 --- a/actions-workflow-parser/testdata/reader/step-if.yml +++ b/actions-workflow-parser/testdata/reader/step-if.yml @@ -1,6 +1,4 @@ include-source: false # Drop file/line/col from output -skip: - - TypeScript --- on: push jobs: diff --git a/actions-workflow-parser/testdata/reader/step-run.yml b/actions-workflow-parser/testdata/reader/step-run.yml index afca5f3..5ffe475 100644 --- a/actions-workflow-parser/testdata/reader/step-run.yml +++ b/actions-workflow-parser/testdata/reader/step-run.yml @@ -2,19 +2,24 @@ include-source: false # Drop file/line/col from output --- on: push jobs: - build: + build1: runs-on: ubuntu-latest steps: - run: echo ${{ github.sha }} # github context - run: echo ${{ vars.foo }} # vars context - run: echo ${{ steps.foo }} # steps context + build2: + runs-on: ubuntu-latest + steps: + - run: ${{ '${{ this is an escaped expression }}' }} # escaped expression + - run: ${{ 'it''s an escaped quote' }} # escaped quote --- { "jobs": [ { "type": "job", - "id": "build", - "name": "build", + "id": "build1", + "name": "build1", "if": { "type": 3, "expr": "success()" @@ -55,6 +60,34 @@ jobs: } } ] + }, + { + "type": "job", + "id": "build2", + "name": "build2", + "if": { + "type": 3, + "expr": "success()" + }, + "runs-on": "ubuntu-latest", + "steps": [ + { + "id": "__run", + "if": { + "type": 3, + "expr": "success()" + }, + "run": "${{ this is an escaped expression }}" + }, + { + "id": "__run_2", + "if": { + "type": 3, + "expr": "success()" + }, + "run": "it's an escaped quote" + } + ] } ] } diff --git a/actions-workflow-parser/testdata/reader/workflow-defaults.yml b/actions-workflow-parser/testdata/reader/workflow-defaults.yml index 51fb7f8..0e8162c 100644 --- a/actions-workflow-parser/testdata/reader/workflow-defaults.yml +++ b/actions-workflow-parser/testdata/reader/workflow-defaults.yml @@ -1,6 +1,4 @@ include-source: false # Drop file/line/col from output -skip: - - TypeScript --- on: push defaults: diff --git a/actions-workflow-parser/testdata/reader/yaml-schema-float.yml b/actions-workflow-parser/testdata/reader/yaml-schema-float.yml index fb7f36f..247833d 100644 --- a/actions-workflow-parser/testdata/reader/yaml-schema-float.yml +++ b/actions-workflow-parser/testdata/reader/yaml-schema-float.yml @@ -1,6 +1,4 @@ include-source: false # Drop file/line/col from output -skip: - - TypeScript --- on: push jobs: diff --git a/actions-workflow-parser/testdata/reader/yaml-schema-int.yml b/actions-workflow-parser/testdata/reader/yaml-schema-int.yml index a6189c4..35a3184 100644 --- a/actions-workflow-parser/testdata/reader/yaml-schema-int.yml +++ b/actions-workflow-parser/testdata/reader/yaml-schema-int.yml @@ -16,9 +16,15 @@ jobs: - 0 - -0 - +0 + - 0000 + - -0000 - 0xff - 0xFF - 0o10 + - 0755 + - 00755 + - +00755 + - -00755 # Integer, explicit type - !!int 1 @@ -64,9 +70,15 @@ jobs: 0, 0, 0, + 0, + 0, 255, 255, 8, + 755, + 755, + 755, + -755, 1, -1, 1, diff --git a/actions-workflow-parser/testdata/reader/yaml-schema-sequence.yml b/actions-workflow-parser/testdata/reader/yaml-schema-sequence.yml index 8d458f7..5a8f525 100644 --- a/actions-workflow-parser/testdata/reader/yaml-schema-sequence.yml +++ b/actions-workflow-parser/testdata/reader/yaml-schema-sequence.yml @@ -1,6 +1,4 @@ include-source: false # Drop file/line/col from output -skip: - - TypeScript --- on: push jobs: diff --git a/actions-workflow-parser/testdata/reader/yaml-schema-str-flow-styles.yml b/actions-workflow-parser/testdata/reader/yaml-schema-str-flow-styles.yml index 9f2a87c..b8772d3 100644 --- a/actions-workflow-parser/testdata/reader/yaml-schema-str-flow-styles.yml +++ b/actions-workflow-parser/testdata/reader/yaml-schema-str-flow-styles.yml @@ -1,6 +1,4 @@ include-source: false # Drop file/line/col from output -skip: - - TypeScript --- on: push jobs: diff --git a/actions-workflow-parser/testdata/reader/yaml-schema-string.yml b/actions-workflow-parser/testdata/reader/yaml-schema-string.yml index cc9ca28..da60fcb 100644 --- a/actions-workflow-parser/testdata/reader/yaml-schema-string.yml +++ b/actions-workflow-parser/testdata/reader/yaml-schema-string.yml @@ -1,6 +1,4 @@ include-source: false # Drop file/line/col from output -skip: - - TypeScript --- on: push jobs: diff --git a/actions-workflow-parser/testdata/reader/yaml-schema-timestamp.yml b/actions-workflow-parser/testdata/reader/yaml-schema-timestamp.yml index c722fb9..9009132 100644 --- a/actions-workflow-parser/testdata/reader/yaml-schema-timestamp.yml +++ b/actions-workflow-parser/testdata/reader/yaml-schema-timestamp.yml @@ -1,6 +1,4 @@ include-source: false # Drop file/line/col from output -skip: - - TypeScript --- on: push jobs: diff --git a/actions-workflow-parser/testdata/skipped-tests.txt b/actions-workflow-parser/testdata/skipped-tests.txt new file mode 100644 index 0000000..7da9375 --- /dev/null +++ b/actions-workflow-parser/testdata/skipped-tests.txt @@ -0,0 +1,96 @@ +bad-character.yml +coercion-to-string.yml +concurrency.yml +errors-anchor-tag.yml +errors-expressions.yml +errors-invalid-mapping-key.yml +errors-job-concurrency.yml +errors-job-runs-on-group-invalid-prefix.yml +errors-matrix-empty-vector.yml +errors-matrix-max-depth.yml +errors-max-depth.yml +errors-max-file-size.yml +errors-max-job-limit-with-reusable-workflow.yml +errors-max-result-size.yml +errors-parse-boolean.yml +errors-parse-float.yml +errors-parse-integer.yml +errors-reusable-workflow-job-inputs-type-mismatch.yml +errors-reusable-workflow-job-nested-depth-exceeded.yml +errors-reusable-workflow-job-nested-permissions-not-allowed-job-level-from-caller-job-level.yml +errors-reusable-workflow-job-nested-permissions-not-allowed-job-level-from-caller-workflow-level.yml +errors-reusable-workflow-job-nested-permissions-not-allowed-workflow-level-from-caller-job-level.yml +errors-reusable-workflow-job-nested-permissions-not-allowed-workflow-level-from-caller-workflow-level.yml +errors-reusable-workflow-max-result-size.yml +errors-reusable-workflow-permissions-not-allowed-job-level-from-caller-default.yml +errors-reusable-workflow-permissions-not-allowed-job-level-from-caller-job-level.yml +errors-reusable-workflow-permissions-not-allowed-job-level-from-caller-workflow-level.yml +errors-reusable-workflow-permissions-not-allowed-request-actions-write.yml +errors-reusable-workflow-permissions-not-allowed-request-checks-write.yml +errors-reusable-workflow-permissions-not-allowed-request-contents-write.yml +errors-reusable-workflow-permissions-not-allowed-request-deployments-write.yml +errors-reusable-workflow-permissions-not-allowed-request-discussions-write.yml +errors-reusable-workflow-permissions-not-allowed-request-id-token-write.yml +errors-reusable-workflow-permissions-not-allowed-request-issues-write.yml +errors-reusable-workflow-permissions-not-allowed-request-packages-write.yml +errors-reusable-workflow-permissions-not-allowed-request-pages-write.yml +errors-reusable-workflow-permissions-not-allowed-request-pull-requests-write.yml +errors-reusable-workflow-permissions-not-allowed-request-read-all-allowed-none.yml +errors-reusable-workflow-permissions-not-allowed-request-repository-projects-write.yml +errors-reusable-workflow-permissions-not-allowed-request-security-events-write.yml +errors-reusable-workflow-permissions-not-allowed-request-statuses-write.yml +errors-reusable-workflow-permissions-not-allowed-request-write-all-allowed-none.yml +errors-reusable-workflow-permissions-not-allowed-request-write-all-allowed-read-all.yml +errors-reusable-workflow-permissions-not-allowed-workflow-level-from-caller-default.yml +errors-reusable-workflow-permissions-not-allowed-workflow-level-from-caller-job-level.yml +errors-reusable-workflow-permissions-not-allowed-workflow-level-from-caller-workflow-level.yml +errors-step-id.yml +errors-step-run-exceeds-length.yml +errors-step-uses-syntax.yml +errors-unclosed-tokens.yml +errors-yaml-invalid-style.yml +errors-yaml-tags-explicit-unsupported.yml +escape-html-values.yml +float-folded-style.yml +insert.yml +is-partial-rerun.yml +job-basic.yml +job-cancel-timeout-minutes.yml +job-concurrency.yml +job-continue-on-error.yml +job-defaults.yml +job-if.yml +job-permissions.yml +job-timeout-minutes.yml +matrix-basic.yml +misc-jobs.yml +misc-steps.yml +mvp.yml +on-workflow_dispatch-inputs-null.yml +on-workflow_dispatch-inputs.yml +on-workflow_dispatch-unknown-keys-ignored.yml +permissions.yml +preserves-source-info-basic.yml +preserves-source-info-reusable-workflow.yml +preserves-source-info-simple.yml +reusable-workflow-job-nested-basic.yml +reusable-workflow-job-nested-multiple.yml +reusable-workflow-job-nested-permissions.yml +reusable-workflow-job-permissions-embedded-permissions-after-jobs.yml +reusable-workflow-job-permissions-embedded-permissions.yml +reusable-workflow-job-permissions-overrides-default-limited-read.yml +reusable-workflow-job-permissions-default-limited-read-allows-contents-packages.yml +reusable-workflow-job-permissions-overrides-default-limited-write.yml +reusable-workflow-job-permissions-overrides-default-write.yml +reusable-workflow-job-permissions-overrides-workflow-level.yml +root-env-defaults.yml +round-to-infinity.yml +step-if.yml +scientific-notation-number.yml +skip-reusable-workflows.yml +workflow-defaults.yml +yaml-schema-float.yml +yaml-schema-sequence.yml +yaml-schema-str-flow-styles.yml +yaml-schema-string.yml +yaml-schema-timestamp.yml diff --git a/actions-workflow-parser/testdata/sync-tests.sh b/actions-workflow-parser/testdata/sync-tests.sh new file mode 100755 index 0000000..904c41b --- /dev/null +++ b/actions-workflow-parser/testdata/sync-tests.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +TEST_DATA_DIR="$HOME/github/actions-workflow-parser/testdata/reader" + +REPO_ROOT="$(git rev-parse --show-toplevel)" + +DEST_DIR="$REPO_ROOT/actions-workflow-parser/testdata/reader" + +cp -f "$TEST_DATA_DIR"/* "$DEST_DIR"/ diff --git a/browser-playground/package.json b/browser-playground/package.json index 3a5eee5..d188d7f 100644 --- a/browser-playground/package.json +++ b/browser-playground/package.json @@ -1,12 +1,12 @@ { "name": "browser-playground", - "version": "0.1.148", + "version": "0.1.150", "description": "", "private": true, "main": "index.js", "type": "module", "dependencies": { - "@github/actions-languageserver": "^0.1.148", + "@github/actions-languageserver": "^0.1.150", "monaco-editor-webpack-plugin": "^7.0.1", "monaco-editor-workers": "^0.34.2", "monaco-languageclient": "^4.0.3", diff --git a/lerna.json b/lerna.json index 24ca009..540b816 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { "$schema": "node_modules/lerna/schemas/lerna-schema.json", "useWorkspaces": true, - "version": "0.1.148" + "version": "0.1.150" } diff --git a/package-lock.json b/package-lock.json index f454ff9..ca3c36b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -18,7 +18,7 @@ }, "actions-expressions": { "name": "@github/actions-expressions", - "version": "0.1.148", + "version": "0.1.150", "license": "MIT", "devDependencies": { "@types/jest": "^29.0.3", @@ -34,11 +34,11 @@ }, "actions-languageserver": { "name": "@github/actions-languageserver", - "version": "0.1.148", + "version": "0.1.150", "license": "MIT", "dependencies": { - "@github/actions-languageservice": "^0.1.148", - "@github/actions-workflow-parser": "^0.1.148", + "@github/actions-languageservice": "^0.1.150", + "@github/actions-workflow-parser": "^0.1.150", "@octokit/rest": "^19.0.7", "vscode-languageserver": "^8.0.2", "vscode-languageserver-textdocument": "^1.0.7", @@ -59,11 +59,11 @@ }, "actions-languageservice": { "name": "@github/actions-languageservice", - "version": "0.1.148", + "version": "0.1.150", "license": "MIT", "dependencies": { - "@github/actions-expressions": "^0.1.148", - "@github/actions-workflow-parser": "^0.1.148", + "@github/actions-expressions": "^0.1.150", + "@github/actions-workflow-parser": "^0.1.150", "vscode-languageserver-textdocument": "^1.0.7", "vscode-languageserver-types": "^3.17.2", "yaml": "^2.1.1" @@ -84,10 +84,10 @@ }, "actions-workflow-parser": { "name": "@github/actions-workflow-parser", - "version": "0.1.148", + "version": "0.1.150", "license": "MIT", "dependencies": { - "@github/actions-expressions": "^0.1.148", + "@github/actions-expressions": "^0.1.150", "cronstrue": "^2.21.0", "yaml": "^2.0.0-8" }, @@ -107,10 +107,10 @@ } }, "browser-playground": { - "version": "0.1.148", + "version": "0.1.150", "license": "MIT", "dependencies": { - "@github/actions-languageserver": "^0.1.148", + "@github/actions-languageserver": "^0.1.150", "monaco-editor-webpack-plugin": "^7.0.1", "monaco-editor-workers": "^0.34.2", "monaco-languageclient": "^4.0.3", @@ -14733,8 +14733,8 @@ "@github/actions-languageserver": { "version": "file:actions-languageserver", "requires": { - "@github/actions-languageservice": "^0.1.148", - "@github/actions-workflow-parser": "^0.1.148", + "@github/actions-languageservice": "^0.1.150", + "@github/actions-workflow-parser": "^0.1.150", "@octokit/rest": "^19.0.7", "@types/jest": "^29.0.3", "fetch-mock": "^9.11.0", @@ -14751,8 +14751,8 @@ "@github/actions-languageservice": { "version": "file:actions-languageservice", "requires": { - "@github/actions-expressions": "^0.1.148", - "@github/actions-workflow-parser": "^0.1.148", + "@github/actions-expressions": "^0.1.150", + "@github/actions-workflow-parser": "^0.1.150", "@types/jest": "^29.0.3", "jest": "^29.0.3", "prettier": "^2.8.3", @@ -14769,7 +14769,7 @@ "@github/actions-workflow-parser": { "version": "file:actions-workflow-parser", "requires": { - "@github/actions-expressions": "^0.1.148", + "@github/actions-expressions": "^0.1.150", "@types/jest": "^29.0.3", "@typescript-eslint/eslint-plugin": "^5.40.0", "@typescript-eslint/parser": "^5.40.0", @@ -17763,7 +17763,7 @@ "browser-playground": { "version": "file:browser-playground", "requires": { - "@github/actions-languageserver": "^0.1.148", + "@github/actions-languageserver": "^0.1.150", "css-loader": "^6.7.2", "monaco-editor-webpack-plugin": "^7.0.1", "monaco-editor-workers": "^0.34.2",