diff --git a/actions-workflow-parser/testdata/reader/concurrency.yml b/actions-workflow-parser/testdata/reader/concurrency.yml index ad07011..473f159 100644 --- a/actions-workflow-parser/testdata/reader/concurrency.yml +++ b/actions-workflow-parser/testdata/reader/concurrency.yml @@ -1,9 +1,7 @@ include-source: false # Drop file/line/col from output -skip: - - TypeScript --- on: push -concurrency: +concurrency: group: ${{ github.ref }} cancel-in-progress: true jobs: @@ -13,7 +11,7 @@ jobs: - uses: actions/checkout@v3 - run: echo hi continue-on-error: true - concurrency: + concurrency: group: ${{ github.ref }} cancel-in-progress: true build2: @@ -24,7 +22,7 @@ jobs: concurrency: staging build4: runs-on: macos-latest - concurrency: + concurrency: group: ref cancel-in-progress: ${{ github.ref }} diff --git a/actions-workflow-parser/testdata/reader/errors-insert.yml b/actions-workflow-parser/testdata/reader/errors-insert.yml new file mode 100644 index 0000000..8e91acf --- /dev/null +++ b/actions-workflow-parser/testdata/reader/errors-insert.yml @@ -0,0 +1,25 @@ +include-source: false # Drop file/line/col from output +skip: + - TypeScript +--- +on: push +jobs: + run: + runs-on: ubuntu-latest + env: + bad_insert1: "This is a bad ${{ insert }}" + bad_insert2: "${{ insert }} are bad at the beginning" + ${{ insert }}: ${{ github.ref }} + steps: + - run: echo hi +--- +{ + "errors": [ + { + "Message": ".github/workflows/errors-insert.yml (Line: 6, Col: 20): The directive 'insert' is not allowed in this context. Directives are not supported for expressions that are embedded within a string. Directives are only supported when the entire value is an expression." + }, + { + "Message": ".github/workflows/errors-insert.yml (Line: 7, Col: 20): The directive 'insert' is not allowed in this context. Directives are not supported for expressions that are embedded within a string. Directives are only supported when the entire value is an expression." + } + ] +} diff --git a/actions-workflow-parser/testdata/reader/errors-invalid-mapping-key.yml b/actions-workflow-parser/testdata/reader/errors-invalid-mapping-key.yml new file mode 100644 index 0000000..81ecbe6 --- /dev/null +++ b/actions-workflow-parser/testdata/reader/errors-invalid-mapping-key.yml @@ -0,0 +1,17 @@ +include-source: false # Drop file/line/col from output +--- +on: push +jobs: + build: + runs-on: ubuntu-latest + steps: + - null : ' ' + run: echo {{ 😀 }} +--- +{ + "errors": [ + { + "Message": ".github/workflows/errors-invalid-mapping-key.yml (Line: 6, Col: 9): Unexpected value ''" + } + ] +} \ No newline at end of file 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 2b35981..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: @@ -15,7 +13,7 @@ jobs: steps: - run: echo hi build3: - runs-on: + runs-on: group: ent/ steps: - run: echo hi diff --git a/actions-workflow-parser/testdata/reader/errors-matrix-bad-key.yml b/actions-workflow-parser/testdata/reader/errors-matrix-bad-key.yml new file mode 100644 index 0000000..164ca3a --- /dev/null +++ b/actions-workflow-parser/testdata/reader/errors-matrix-bad-key.yml @@ -0,0 +1,19 @@ +include-source: false # Drop file/line/col from output +--- +on: push +jobs: + bad-strategy-key: + strategy: + bad-key: + os: [10] + runs-on: macos-latest + steps: + - run: echo hi +--- +{ + "errors": [ + { + "Message": ".github/workflows/errors-matrix-bad-key.yml (Line: 5, Col: 7): Unexpected value 'bad-key'" + } + ] +} \ No newline at end of file diff --git a/actions-workflow-parser/testdata/reader/errors-matrix-empty-vector.yml b/actions-workflow-parser/testdata/reader/errors-matrix-empty-vector.yml new file mode 100644 index 0000000..1cce7ef --- /dev/null +++ b/actions-workflow-parser/testdata/reader/errors-matrix-empty-vector.yml @@ -0,0 +1,20 @@ +include-source: false # Drop file/line/col from output +--- +on: push +jobs: + empty-vector: + strategy: + matrix: + os: [] + version: [10,12] + runs-on: macos-latest + steps: + - run: echo hi +--- +{ + "errors": [ + { + "Message": ".github/workflows/errors-matrix-empty-vector.yml (Line: 6, Col: 13): Matrix vector 'os' does not contain any values" + } + ] +} \ No newline at end of file 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 539fbee..b5e9963 100644 --- a/actions-workflow-parser/testdata/reader/errors-max-depth.yml +++ b/actions-workflow-parser/testdata/reader/errors-max-depth.yml @@ -1,7 +1,5 @@ include-source: false # Drop file/line/col from output max-depth: 5 -skip: - - TypeScript --- on: push jobs: 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 ec56b7b..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,7 +1,5 @@ include-source: false # Drop file/line/col from output max-file-size: 124 -skip: - - TypeScript --- on: push jobs: 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 67a93c7..4ec8e21 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 max-result-size: 768 -skip: - - TypeScript --- on: push jobs: diff --git a/actions-workflow-parser/testdata/reader/errors-reusable-workflow-job-inputs-required.yml b/actions-workflow-parser/testdata/reader/errors-reusable-workflow-job-inputs-required.yml index df6d826..6f1d9fb 100644 --- a/actions-workflow-parser/testdata/reader/errors-reusable-workflow-job-inputs-required.yml +++ b/actions-workflow-parser/testdata/reader/errors-reusable-workflow-job-inputs-required.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-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-inputs-undefined.yml b/actions-workflow-parser/testdata/reader/errors-reusable-workflow-job-inputs-undefined.yml index 7611a4c..87c5b82 100644 --- a/actions-workflow-parser/testdata/reader/errors-reusable-workflow-job-inputs-undefined.yml +++ b/actions-workflow-parser/testdata/reader/errors-reusable-workflow-job-inputs-undefined.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-required.yml b/actions-workflow-parser/testdata/reader/errors-reusable-workflow-job-secrets-required.yml index 6015a83..1bd2c84 100644 --- a/actions-workflow-parser/testdata/reader/errors-reusable-workflow-job-secrets-required.yml +++ b/actions-workflow-parser/testdata/reader/errors-reusable-workflow-job-secrets-required.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-secrets-undefined.yml b/actions-workflow-parser/testdata/reader/errors-reusable-workflow-job-secrets-undefined.yml index 97ad0e7..48d9816 100644 --- a/actions-workflow-parser/testdata/reader/errors-reusable-workflow-job-secrets-undefined.yml +++ b/actions-workflow-parser/testdata/reader/errors-reusable-workflow-job-secrets-undefined.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-secrets.yml b/actions-workflow-parser/testdata/reader/errors-reusable-workflow-job-secrets.yml index b812f32..dac0d5a 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,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-max-result-size.yml b/actions-workflow-parser/testdata/reader/errors-reusable-workflow-max-result-size.yml index 1b32531..861ec90 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 @@ -1,7 +1,6 @@ include-source: false # Drop file/line/col from output max-result-size: 2048 skip: - - TypeScript - Go --- on: push 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..2cab2b0 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 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/errors-unexpected-mapping.yml b/actions-workflow-parser/testdata/reader/errors-unexpected-mapping.yml index 5482655..eb365b1 100644 --- a/actions-workflow-parser/testdata/reader/errors-unexpected-mapping.yml +++ b/actions-workflow-parser/testdata/reader/errors-unexpected-mapping.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 5138f67..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: @@ -12,7 +10,7 @@ jobs: steps: - run: echo Hello && World #string token build2: - if: false + if: false runs-on: ubuntu-latest steps: - run: echo 1 diff --git a/actions-workflow-parser/testdata/reader/float-folded-style.yml b/actions-workflow-parser/testdata/reader/float-folded-style.yml new file mode 100644 index 0000000..f3fdb4d --- /dev/null +++ b/actions-workflow-parser/testdata/reader/float-folded-style.yml @@ -0,0 +1,47 @@ +include-source: false # Drop file/line/col from output +--- +on: push +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Switch to using Python 3.10 by default + uses: actions/setup-python@v4 + with: + python-version: >- + 3.10 +--- +{ + "jobs": [ + { + "type": "job", + "id": "build", + "name": "build", + "if": { + "type": 3, + "expr": "success()" + }, + "runs-on": "ubuntu-latest", + "steps": [ + { + "id": "__actions_setup-python", + "name": "Switch to using Python 3.10 by default", + "if": { + "type": 3, + "expr": "success()" + }, + "uses": "actions/setup-python@v4", + "with": { + "type": 2, + "map": [ + { + "Key": "python-version", + "Value": "3.10" + } + ] + } + } + ] + } + ] +} \ No newline at end of file diff --git a/actions-workflow-parser/testdata/reader/insert.yml b/actions-workflow-parser/testdata/reader/insert.yml new file mode 100644 index 0000000..11f7d95 --- /dev/null +++ b/actions-workflow-parser/testdata/reader/insert.yml @@ -0,0 +1,94 @@ +include-source: false # Drop file/line/col from output +skip: + - TypeScript +--- +on: push +jobs: + generate: + runs-on: ubuntu-latest + outputs: + matrix_map: ${{ steps.set-matrix.outputs.matrix }} + steps: + - run: echo hi + run: + runs-on: ubuntu-latest + needs: generate + env: + ${{ insert }}: ${{ fromJson(needs.generate.outputs.matrix_map) }} + steps: + - run: echo hi +--- +{ + "jobs": [ + { + "type": "job", + "id": "generate", + "name": "generate", + "if": { + "type": 3, + "expr": "success()" + }, + "runs-on": "ubuntu-latest", + "outputs": { + "type": 2, + "map": [ + { + "Key": "matrix_map", + "Value": { + "type": 3, + "expr": "steps.set-matrix.outputs.matrix" + } + } + ] + }, + "steps": [ + { + "id": "__run", + "if": { + "type": 3, + "expr": "success()" + }, + "run": "echo hi" + } + ] + }, + { + "type": "job", + "id": "run", + "name": "run", + "needs": [ + "generate" + ], + "if": { + "type": 3, + "expr": "success()" + }, + "env": { + "type": 2, + "map": [ + { + "Key": { + "type": 4, + "directive": "insert" + }, + "Value": { + "type": 3, + "expr": "fromJson(needs.generate.outputs.matrix_map)" + } + } + ] + }, + "runs-on": "ubuntu-latest", + "steps": [ + { + "id": "__run", + "if": { + "type": 3, + "expr": "success()" + }, + "run": "echo hi" + } + ] + } + ] +} 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 bfa5a5b..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: @@ -21,7 +19,7 @@ jobs: runs-on: ubuntu-latest steps: - run: echo hi - build4: + build4: needs: - build - build2 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-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 new file mode 100644 index 0000000..f8738d1 --- /dev/null +++ b/actions-workflow-parser/testdata/reader/matrix-basic.yml @@ -0,0 +1,283 @@ +include-source: false # Drop file/line/col from output +--- +on: push +jobs: + matrix-basic: + strategy: + matrix: + version: [10, 12, 14] + os: [ubuntu-latest, windows-latest] + runs-on: ${{ matrix.os }} + steps: + - run: echo hi + matrix-nested-sequences: + strategy: + matrix: + version: [[[[10]],2],12,14] + os: [ubuntu-latest, windows-latest] + runs-on: ${{ matrix.os }} + steps: + - run: echo hi + matrix-with-infinity: + strategy: + matrix: + version: [1, 999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999] + os: [ubuntu-latest, windows-latest] + runs-on: ${{ matrix.os }} + steps: + - run: echo hi + nested-matrix: + strategy: + matrix: { vector1: [ {foo: {bar: baz} } ] } + runs-on: linux + steps: + - run: echo hi +--- +{ + "jobs": [ + { + "type": "job", + "id": "matrix-basic", + "name": "matrix-basic", + "if": { + "type": 3, + "expr": "success()" + }, + "strategy": { + "type": 2, + "map": [ + { + "Key": "matrix", + "Value": { + "type": 2, + "map": [ + { + "Key": "version", + "Value": { + "type": 1, + "seq": [ + 10, + 12, + 14 + ] + } + }, + { + "Key": "os", + "Value": { + "type": 1, + "seq": [ + "ubuntu-latest", + "windows-latest" + ] + } + } + ] + } + } + ] + }, + "runs-on": { + "type": 3, + "expr": "matrix.os" + }, + "steps": [ + { + "id": "__run", + "if": { + "type": 3, + "expr": "success()" + }, + "run": "echo hi" + } + ] + }, + { + "type": "job", + "id": "matrix-nested-sequences", + "name": "matrix-nested-sequences", + "if": { + "type": 3, + "expr": "success()" + }, + "strategy": { + "type": 2, + "map": [ + { + "Key": "matrix", + "Value": { + "type": 2, + "map": [ + { + "Key": "version", + "Value": { + "type": 1, + "seq": [ + { + "type": 1, + "seq": [ + { + "type": 1, + "seq": [ + { + "type": 1, + "seq": [ + 10 + ] + } + ] + }, + 2 + ] + }, + 12, + 14 + ] + } + }, + { + "Key": "os", + "Value": { + "type": 1, + "seq": [ + "ubuntu-latest", + "windows-latest" + ] + } + } + ] + } + } + ] + }, + "runs-on": { + "type": 3, + "expr": "matrix.os" + }, + "steps": [ + { + "id": "__run", + "if": { + "type": 3, + "expr": "success()" + }, + "run": "echo hi" + } + ] + }, + { + "type": "job", + "id": "matrix-with-infinity", + "name": "matrix-with-infinity", + "if": { + "type": 3, + "expr": "success()" + }, + "strategy": { + "type": 2, + "map": [ + { + "Key": "matrix", + "Value": { + "type": 2, + "map": [ + { + "Key": "version", + "Value": { + "type": 1, + "seq": [ + 1, + "Infinity" + ] + } + }, + { + "Key": "os", + "Value": { + "type": 1, + "seq": [ + "ubuntu-latest", + "windows-latest" + ] + } + } + ] + } + } + ] + }, + "runs-on": { + "type": 3, + "expr": "matrix.os" + }, + "steps": [ + { + "id": "__run", + "if": { + "type": 3, + "expr": "success()" + }, + "run": "echo hi" + } + ] + }, + { + "type": "job", + "id": "nested-matrix", + "name": "nested-matrix", + "if": { + "type": 3, + "expr": "success()" + }, + "strategy": { + "type": 2, + "map": [ + { + "Key": "matrix", + "Value": { + "type": 2, + "map": [ + { + "Key": "vector1", + "Value": { + "type": 1, + "seq": [ + { + "type": 2, + "map": [ + { + "Key": "foo", + "Value": { + "type": 2, + "map": [ + { + "Key": "bar", + "Value": "baz" + } + ] + } + } + ] + } + ] + } + } + ] + } + } + ] + }, + "runs-on": "linux", + "steps": [ + { + "id": "__run", + "if": { + "type": 3, + "expr": "success()" + }, + "run": "echo hi" + } + ] + } + ] +} \ 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 ca88646..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: @@ -10,7 +8,7 @@ jobs: name: ${{ github.actor }} timeout-minutes: ${{ github.ref }} cancel-timeout-minutes: 300 - concurrency: + concurrency: group: ${{ github.ref }} cancel-in-progress: true env: @@ -28,10 +26,10 @@ jobs: build2: runs-on: [self-hosted, linux] continue-on-error: true - name: Jobs Repro Hardcode + name: Jobs Repro Hardcode timeout-minutes: 360 cancel-timeout-minutes: 300 - concurrency: + concurrency: group: groupA cancel-in-progress: true env: 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 c1a963d..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 56920d2..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,7 +1,4 @@ include-source: false # Drop file/line/col from output -skip: - - Go - - Typescript --- on: workflow_dispatch: @@ -22,6 +19,10 @@ on: - debug # Defaults to string input4: + input5-Env: + description: 'Test environment' + type: environment + required: true jobs: my-job: runs-on: ubuntu-latest @@ -33,7 +34,8 @@ jobs: "input1": "string", "input2": "boolean", "input3": "choice", - "input4": "string" + "input4": "string", + "input5-Env": "environment" }, "jobs": [ { 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 2b53084..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 54ba0de..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: @@ -24,7 +22,7 @@ jobs: - uses: actions/checkout@v3 - run: echo hi continue-on-error: true - deploy: + deploy: runs-on: ubuntu-latest permissions: actions: write 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 9063438..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,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-reusable-workflow.yml b/actions-workflow-parser/testdata/reader/preserves-source-info-reusable-workflow.yml index f7ed89e..6721b26 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,6 @@ include-source: true # Preserve file/line/col in serialized output skip: - Go - - TypeScript --- on: push jobs: @@ -33,46 +32,34 @@ jobs: { "jobs": [ { - "Type": "reusableWorkflowJob", - "Id": { + "type": "reusableWorkflowJob", + "id": { "type": 0, "file": 1, "line": 3, "col": 3, "lit": "build" }, - "Name": { + "name": { "type": 0, "file": 1, "line": 3, "col": 3, "lit": "build" }, - "Needs": [], - "If": { + "needs": [], + "if": { "type": 3, "expr": "success()" }, - "Ref": { + "ref": { "type": 0, "file": 1, "line": 4, "col": 11, "lit": "some-org-1/some-repo-1/.github/workflows/build.yml@v1" }, - "Permissions": null, - "InputDefinitions": null, - "InputValues": null, - "SecretDefinitions": null, - "SecretValues": null, - "InheritSecrets": false, - "Outputs": null, - "Defaults": null, - "Env": null, - "Concurrency": null, - "EmbeddedConcurrency": null, - "Strategy": null, - "Jobs": [ + "jobs": [ { "type": "job", "id": { @@ -120,46 +107,34 @@ jobs: ] }, { - "Type": "reusableWorkflowJob", - "Id": { + "type": "reusableWorkflowJob", + "id": { "type": 0, "file": 1, "line": 5, "col": 3, "lit": "deploy" }, - "Name": { + "name": { "type": 0, "file": 1, "line": 5, "col": 3, "lit": "deploy" }, - "Needs": [], - "If": { + "needs": [], + "if": { "type": 3, "expr": "success()" }, - "Ref": { + "ref": { "type": 0, "file": 1, "line": 6, "col": 11, "lit": "some-org-2/some-repo-2/.github/workflows/deploy.yml@v2" }, - "Permissions": null, - "InputDefinitions": null, - "InputValues": null, - "SecretDefinitions": null, - "SecretValues": null, - "InheritSecrets": false, - "Outputs": null, - "Defaults": null, - "Env": null, - "Concurrency": null, - "EmbeddedConcurrency": null, - "Strategy": null, - "Jobs": [ + "jobs": [ { "type": "job", "id": { 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 e7797df..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,9 +1,7 @@ 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) +# with include-source: true. Currently it is missing type 4 (insert expression) # and type 7 (null), once we have matrix strategy we should be able to get null or combine # this test with preserves-source-info-basic.yml. on: push diff --git a/actions-workflow-parser/testdata/reader/reusable-workflow-inputs.yml b/actions-workflow-parser/testdata/reader/reusable-workflow-inputs.yml index 0e209c6..3604796 100644 --- a/actions-workflow-parser/testdata/reader/reusable-workflow-inputs.yml +++ b/actions-workflow-parser/testdata/reader/reusable-workflow-inputs.yml @@ -1,7 +1,6 @@ include-source: false # Drop file/line/col from output skip: - Go - - TypeScript --- on: push jobs: @@ -53,17 +52,16 @@ jobs: { "jobs": [ { - "Type": "reusableWorkflowJob", - "Id": "build", - "Name": "build", - "Needs": [], - "If": { + "type": "reusableWorkflowJob", + "id": "build", + "name": "build", + "needs": [], + "if": { "type": 3, "expr": "success()" }, - "Ref": "contoso/templates/.github/workflows/build.yml@v1", - "Permissions": null, - "InputDefinitions": { + "ref": "contoso/templates/.github/workflows/build.yml@v1", + "input-definitions": { "type": 2, "map": [ { @@ -200,7 +198,7 @@ jobs: } ] }, - "InputValues": { + "input-values": { "type": 2, "map": [ { @@ -229,16 +227,7 @@ jobs: } ] }, - "SecretDefinitions": null, - "SecretValues": null, - "InheritSecrets": false, - "Outputs": null, - "Defaults": null, - "Env": null, - "Concurrency": null, - "EmbeddedConcurrency": null, - "Strategy": null, - "Jobs": [ + "jobs": [ { "type": "job", "id": "deploy", diff --git a/actions-workflow-parser/testdata/reader/reusable-workflow-job-basic.yml b/actions-workflow-parser/testdata/reader/reusable-workflow-job-basic.yml index b4721ab..37fd6ee 100644 --- a/actions-workflow-parser/testdata/reader/reusable-workflow-job-basic.yml +++ b/actions-workflow-parser/testdata/reader/reusable-workflow-job-basic.yml @@ -1,7 +1,6 @@ include-source: false # Drop file/line/col from output skip: - Go - - TypeScript --- on: push jobs: @@ -66,19 +65,18 @@ jobs: ] }, { - "Type": "reusableWorkflowJob", - "Id": "deploy-1", - "Name": "deploy-1", - "Needs": [ + "type": "reusableWorkflowJob", + "id": "deploy-1", + "name": "deploy-1", + "needs": [ "build" ], - "If": { + "if": { "type": 3, "expr": "success()" }, - "Ref": "contoso/templates/.github/workflows/deploy.yml@v1", - "Permissions": null, - "InputDefinitions": { + "ref": "contoso/templates/.github/workflows/deploy.yml@v1", + "input-definitions": { "type": 2, "map": [ { @@ -99,7 +97,7 @@ jobs: } ] }, - "InputValues": { + "input-values": { "type": 2, "map": [ { @@ -108,7 +106,7 @@ jobs: } ] }, - "SecretDefinitions": { + "secret-definitions": { "type": 2, "map": [ { @@ -129,7 +127,7 @@ jobs: } ] }, - "SecretValues": { + "secret-values": { "type": 2, "map": [ { @@ -141,14 +139,7 @@ jobs: } ] }, - "InheritSecrets": false, - "Outputs": null, - "Defaults": null, - "Env": null, - "Concurrency": null, - "EmbeddedConcurrency": null, - "Strategy": null, - "Jobs": [ + "jobs": [ { "type": "job", "id": "job1", @@ -184,19 +175,18 @@ jobs: ] }, { - "Type": "reusableWorkflowJob", - "Id": "deploy-2", - "Name": "deploy-2", - "Needs": [ + "type": "reusableWorkflowJob", + "id": "deploy-2", + "name": "deploy-2", + "needs": [ "build" ], - "If": { + "if": { "type": 3, "expr": "success()" }, - "Ref": "contoso/templates/.github/workflows/deploy.yml@v1", - "Permissions": null, - "InputDefinitions": { + "ref": "contoso/templates/.github/workflows/deploy.yml@v1", + "input-definitions": { "type": 2, "map": [ { @@ -217,7 +207,7 @@ jobs: } ] }, - "InputValues": { + "input-values": { "type": 2, "map": [ { @@ -226,7 +216,7 @@ jobs: } ] }, - "SecretDefinitions": { + "secret-definitions": { "type": 2, "map": [ { @@ -247,15 +237,8 @@ jobs: } ] }, - "SecretValues": null, - "InheritSecrets": true, - "Outputs": null, - "Defaults": null, - "Env": null, - "Concurrency": null, - "EmbeddedConcurrency": null, - "Strategy": null, - "Jobs": [ + "inherit-secrets": true, + "jobs": [ { "type": "job", "id": "job1", diff --git a/actions-workflow-parser/testdata/reader/reusable-workflow-job-inputs-type-coercion.yml b/actions-workflow-parser/testdata/reader/reusable-workflow-job-inputs-type-coercion.yml index 31c89cb..0afcc09 100644 --- a/actions-workflow-parser/testdata/reader/reusable-workflow-job-inputs-type-coercion.yml +++ b/actions-workflow-parser/testdata/reader/reusable-workflow-job-inputs-type-coercion.yml @@ -1,7 +1,6 @@ include-source: false # Drop file/line/col from output skip: - Go - - TypeScript --- on: push jobs: @@ -35,17 +34,16 @@ jobs: { "jobs": [ { - "Type": "reusableWorkflowJob", - "Id": "deploy", - "Name": "deploy", - "Needs": [], - "If": { + "type": "reusableWorkflowJob", + "id": "deploy", + "name": "deploy", + "needs": [], + "if": { "type": 3, "expr": "success()" }, - "Ref": "contoso/templates/.github/workflows/deploy.yml@v1", - "Permissions": null, - "InputDefinitions": { + "ref": "contoso/templates/.github/workflows/deploy.yml@v1", + "input-definitions": { "type": 2, "map": [ { @@ -98,7 +96,7 @@ jobs: } ] }, - "InputValues": { + "input-values": { "type": 2, "map": [ { @@ -119,16 +117,7 @@ jobs: } ] }, - "SecretDefinitions": null, - "SecretValues": null, - "InheritSecrets": false, - "Outputs": null, - "Defaults": null, - "Env": null, - "Concurrency": null, - "EmbeddedConcurrency": null, - "Strategy": null, - "Jobs": [ + "jobs": [ { "type": "job", "id": "job1", 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 5b52215..3e67c56 100644 --- a/actions-workflow-parser/testdata/reader/reusable-workflow-job-name.yml +++ b/actions-workflow-parser/testdata/reader/reusable-workflow-job-name.yml @@ -1,7 +1,6 @@ include-source: false # Drop file/line/col from output skip: - Go - - TypeScript --- on: push jobs: @@ -26,28 +25,16 @@ jobs: { "jobs": [ { - "Type": "reusableWorkflowJob", - "Id": "build", - "Name": "build", - "Needs": [], - "If": { + "type": "reusableWorkflowJob", + "id": "build", + "name": "build", + "needs": [], + "if": { "type": 3, "expr": "success()" }, - "Ref": "contoso/templates/.github/workflows/build.yml@v1", - "Permissions": null, - "InputDefinitions": null, - "InputValues": null, - "SecretDefinitions": null, - "SecretValues": null, - "InheritSecrets": false, - "Outputs": null, - "Defaults": null, - "Env": null, - "Concurrency": null, - "EmbeddedConcurrency": null, - "Strategy": null, - "Jobs": [ + "ref": "contoso/templates/.github/workflows/build.yml@v1", + "jobs": [ { "type": "job", "id": "build-it", @@ -71,28 +58,16 @@ jobs: ] }, { - "Type": "reusableWorkflowJob", - "Id": "build1", - "Name": "custom name", - "Needs": [], - "If": { + "type": "reusableWorkflowJob", + "id": "build1", + "name": "custom name", + "needs": [], + "if": { "type": 3, "expr": "success()" }, - "Ref": "contoso/templates/.github/workflows/build.yml@v1", - "Permissions": null, - "InputDefinitions": null, - "InputValues": null, - "SecretDefinitions": null, - "SecretValues": null, - "InheritSecrets": false, - "Outputs": null, - "Defaults": null, - "Env": null, - "Concurrency": null, - "EmbeddedConcurrency": null, - "Strategy": null, - "Jobs": [ + "ref": "contoso/templates/.github/workflows/build.yml@v1", + "jobs": [ { "type": "job", "id": "build-it", @@ -116,31 +91,19 @@ jobs: ] }, { - "Type": "reusableWorkflowJob", - "Id": "build2", - "Name": { + "type": "reusableWorkflowJob", + "id": "build2", + "name": { "type": 3, "expr": "github.ref" }, - "Needs": [], - "If": { + "needs": [], + "if": { "type": 3, "expr": "success()" }, - "Ref": "contoso/templates/.github/workflows/build.yml@v1", - "Permissions": null, - "InputDefinitions": null, - "InputValues": null, - "SecretDefinitions": null, - "SecretValues": null, - "InheritSecrets": false, - "Outputs": null, - "Defaults": null, - "Env": null, - "Concurrency": null, - "EmbeddedConcurrency": null, - "Strategy": null, - "Jobs": [ + "ref": "contoso/templates/.github/workflows/build.yml@v1", + "jobs": [ { "type": "job", "id": "build-it", 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 9ae18a1..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 @@ -28,51 +27,27 @@ jobs: { "jobs": [ { - "Type": "reusableWorkflowJob", - "Id": "deploy-level-0", - "Name": "deploy-level-0", - "Needs": [], - "If": { + "type": "reusableWorkflowJob", + "id": "deploy-level-0", + "name": "deploy-level-0", + "needs": [], + "if": { "type": 3, "expr": "success()" }, - "Ref": "contoso/templates/.github/workflows/deploy-level-1.yml@v1", - "Permissions": null, - "InputDefinitions": null, - "InputValues": null, - "SecretDefinitions": null, - "SecretValues": null, - "InheritSecrets": false, - "Outputs": null, - "Defaults": null, - "Env": null, - "Concurrency": null, - "EmbeddedConcurrency": null, - "Strategy": null, - "Jobs": [ + "ref": "contoso/templates/.github/workflows/deploy-level-1.yml@v1", + "jobs": [ { - "Type": "reusableWorkflowJob", - "Id": "deploy-level-1", - "Name": "deploy-level-1", - "Needs": [], - "If": { + "type": "reusableWorkflowJob", + "id": "deploy-level-1", + "name": "deploy-level-1", + "needs": [], + "if": { "type": 3, "expr": "success()" }, - "Ref": "contoso/templates/.github/workflows/deploy-level-2.yml@v1", - "Permissions": null, - "InputDefinitions": null, - "InputValues": null, - "SecretDefinitions": null, - "SecretValues": null, - "InheritSecrets": false, - "Outputs": null, - "Defaults": null, - "Env": null, - "Concurrency": null, - "EmbeddedConcurrency": null, - "Strategy": null, - "Jobs": [ + "ref": "contoso/templates/.github/workflows/deploy-level-2.yml@v1", + "jobs": [ { "type": "job", "id": "deploy-level-1", 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 new file mode 100644 index 0000000..8199cf1 --- /dev/null +++ b/actions-workflow-parser/testdata/reader/reusable-workflow-job-nested-multiple.yml @@ -0,0 +1,204 @@ +include-source: false # Drop file/line/col from output +skip: + - Go +max-nested-reusable-workflows-depth: 2 +--- +on: push +jobs: + a: + uses: contoso/templates/.github/workflows/deploy-level-1a.yml@v1 + b: + uses: contoso/templates/.github/workflows/deploy-level-1b.yml@v1 + c: + uses: contoso/templates/.github/workflows/deploy-level-1c.yml@v1 +--- +contoso/templates/.github/workflows/deploy-level-1a.yml@v1 +--- +on: workflow_call +jobs: + deploy-level-1a: + uses: contoso/templates/.github/workflows/deploy-level-2a.yml@v1 +--- +contoso/templates/.github/workflows/deploy-level-2a.yml@v1 +--- +on: workflow_call +jobs: + deploy-level-2a: + runs-on: ubuntu-latest + steps: + - run: echo hi +--- +contoso/templates/.github/workflows/deploy-level-1b.yml@v1 +--- +on: workflow_call +jobs: + deploy-level-1b: + uses: contoso/templates/.github/workflows/deploy-level-2b.yml@v1 +--- +contoso/templates/.github/workflows/deploy-level-2b.yml@v1 +--- +on: workflow_call +jobs: + deploy-level-2b: + runs-on: ubuntu-latest + steps: + - run: echo hi +--- +contoso/templates/.github/workflows/deploy-level-1c.yml@v1 +--- +on: workflow_call +jobs: + deploy-level-1c: + uses: contoso/templates/.github/workflows/deploy-level-2c.yml@v1 +--- +contoso/templates/.github/workflows/deploy-level-2c.yml@v1 +--- +on: workflow_call +jobs: + deploy-level-2c: + runs-on: ubuntu-latest + steps: + - run: echo hi +--- +{ + "jobs": [ + { + "type": "reusableWorkflowJob", + "id": "a", + "name": "a", + "needs": [], + "if": { + "type": 3, + "expr": "success()" + }, + "ref": "contoso/templates/.github/workflows/deploy-level-1a.yml@v1", + "jobs": [ + { + "type": "reusableWorkflowJob", + "id": "deploy-level-1a", + "name": "deploy-level-1a", + "needs": [], + "if": { + "type": 3, + "expr": "success()" + }, + "ref": "contoso/templates/.github/workflows/deploy-level-2a.yml@v1", + "jobs": [ + { + "type": "job", + "id": "deploy-level-2a", + "name": "deploy-level-2a", + "if": { + "type": 3, + "expr": "success()" + }, + "runs-on": "ubuntu-latest", + "steps": [ + { + "id": "__run", + "if": { + "type": 3, + "expr": "success()" + }, + "run": "echo hi" + } + ] + } + ] + } + ] + }, + { + "type": "reusableWorkflowJob", + "id": "b", + "name": "b", + "needs": [], + "if": { + "type": 3, + "expr": "success()" + }, + "ref": "contoso/templates/.github/workflows/deploy-level-1b.yml@v1", + "jobs": [ + { + "type": "reusableWorkflowJob", + "id": "deploy-level-1b", + "name": "deploy-level-1b", + "needs": [], + "if": { + "type": 3, + "expr": "success()" + }, + "ref": "contoso/templates/.github/workflows/deploy-level-2b.yml@v1", + "jobs": [ + { + "type": "job", + "id": "deploy-level-2b", + "name": "deploy-level-2b", + "if": { + "type": 3, + "expr": "success()" + }, + "runs-on": "ubuntu-latest", + "steps": [ + { + "id": "__run", + "if": { + "type": 3, + "expr": "success()" + }, + "run": "echo hi" + } + ] + } + ] + } + ] + }, + { + "type": "reusableWorkflowJob", + "id": "c", + "name": "c", + "needs": [], + "if": { + "type": 3, + "expr": "success()" + }, + "ref": "contoso/templates/.github/workflows/deploy-level-1c.yml@v1", + "jobs": [ + { + "type": "reusableWorkflowJob", + "id": "deploy-level-1c", + "name": "deploy-level-1c", + "needs": [], + "if": { + "type": 3, + "expr": "success()" + }, + "ref": "contoso/templates/.github/workflows/deploy-level-2c.yml@v1", + "jobs": [ + { + "type": "job", + "id": "deploy-level-2c", + "name": "deploy-level-2c", + "if": { + "type": 3, + "expr": "success()" + }, + "runs-on": "ubuntu-latest", + "steps": [ + { + "id": "__run", + "if": { + "type": 3, + "expr": "success()" + }, + "run": "echo hi" + } + ] + } + ] + } + ] + } + ] +} 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 f8b78fd..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 @@ -42,80 +41,47 @@ jobs: }, "jobs": [ { - "Type": "reusableWorkflowJob", - "Id": "deploy-level-0", - "Name": "deploy-level-0", - "Needs": [], - "If": { + "type": "reusableWorkflowJob", + "id": "deploy-level-0", + "name": "deploy-level-0", + "needs": [], + "if": { "type": 3, "expr": "success()" }, - "Ref": "contoso/templates/.github/workflows/deploy-level-1.yml@v1", - "Permissions": { + "ref": "contoso/templates/.github/workflows/deploy-level-1.yml@v1", + "permissions": { "actions": "write" }, - "InputDefinitions": null, - "InputValues": null, - "SecretDefinitions": null, - "SecretValues": null, - "InheritSecrets": false, - "Outputs": null, - "Defaults": null, - "Env": null, - "Concurrency": null, - "EmbeddedConcurrency": null, - "Strategy": null, - "Jobs": [ + "jobs": [ { - "Type": "reusableWorkflowJob", - "Id": "deploy-level-1", - "Name": "deploy-level-1", - "Needs": [], - "If": { + "type": "reusableWorkflowJob", + "id": "deploy-level-1", + "name": "deploy-level-1", + "needs": [], + "if": { "type": 3, "expr": "success()" }, - "Ref": "contoso/templates/.github/workflows/deploy-level-2.yml@v1", - "Permissions": { + "ref": "contoso/templates/.github/workflows/deploy-level-2.yml@v1", + "permissions": { "actions": "read" }, - "InputDefinitions": null, - "InputValues": null, - "SecretDefinitions": null, - "SecretValues": null, - "InheritSecrets": false, - "Outputs": null, - "Defaults": null, - "Env": null, - "Concurrency": null, - "EmbeddedConcurrency": null, - "Strategy": null, - "Jobs": [ + "jobs": [ { - "Type": "reusableWorkflowJob", - "Id": "deploy-level-3", - "Name": "deploy-level-3", - "Needs": [], - "If": { + "type": "reusableWorkflowJob", + "id": "deploy-level-3", + "name": "deploy-level-3", + "needs": [], + "if": { "type": 3, "expr": "success()" }, - "Ref": "contoso/templates/.github/workflows/deploy-level-3.yml@v1", - "Permissions": { + "ref": "contoso/templates/.github/workflows/deploy-level-3.yml@v1", + "permissions": { "actions": "read" }, - "InputDefinitions": null, - "InputValues": null, - "SecretDefinitions": null, - "SecretValues": null, - "InheritSecrets": false, - "Outputs": null, - "Defaults": null, - "Env": null, - "Concurrency": null, - "EmbeddedConcurrency": null, - "Strategy": null, - "Jobs": [ + "jobs": [ { "type": "job", "id": "deploy-level-3", 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 58a2555..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 @@ -47,30 +46,19 @@ permissions: }, "jobs": [ { - "Type": "reusableWorkflowJob", - "Id": "build", - "Name": "build", - "Needs": [], - "If": { + "type": "reusableWorkflowJob", + "id": "build", + "name": "build", + "needs": [], + "if": { "type": 3, "expr": "success()" }, - "Ref": "contoso/templates/.github/workflows/build.yml@v1", - "Permissions": { + "ref": "contoso/templates/.github/workflows/build.yml@v1", + "permissions": { "actions": "write" }, - "InputDefinitions": null, - "InputValues": null, - "SecretDefinitions": null, - "SecretValues": null, - "InheritSecrets": false, - "Outputs": null, - "Defaults": null, - "Env": null, - "Concurrency": null, - "EmbeddedConcurrency": null, - "Strategy": null, - "Jobs": [ + "jobs": [ { "type": "job", "id": "deploy", 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 b0d0b14..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 @@ -47,30 +46,19 @@ jobs: }, "jobs": [ { - "Type": "reusableWorkflowJob", - "Id": "build", - "Name": "build", - "Needs": [], - "If": { + "type": "reusableWorkflowJob", + "id": "build", + "name": "build", + "needs": [], + "if": { "type": 3, "expr": "success()" }, - "Ref": "contoso/templates/.github/workflows/build.yml@v1", - "Permissions": { + "ref": "contoso/templates/.github/workflows/build.yml@v1", + "permissions": { "actions": "read" }, - "InputDefinitions": null, - "InputValues": null, - "SecretDefinitions": null, - "SecretValues": null, - "InheritSecrets": false, - "Outputs": null, - "Defaults": null, - "Env": null, - "Concurrency": null, - "EmbeddedConcurrency": null, - "Strategy": null, - "Jobs": [ + "jobs": [ { "type": "job", "id": "deploy", 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 4eaca32..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 @@ -27,28 +26,16 @@ jobs: { "jobs": [ { - "Type": "reusableWorkflowJob", - "Id": "build", - "Name": "build", - "Needs": [], - "If": { + "type": "reusableWorkflowJob", + "id": "build", + "name": "build", + "needs": [], + "if": { "type": 3, "expr": "success()" }, - "Ref": "contoso/templates/.github/workflows/build.yml@v1", - "Permissions": null, - "InputDefinitions": null, - "InputValues": null, - "SecretDefinitions": null, - "SecretValues": null, - "InheritSecrets": false, - "Outputs": null, - "Defaults": null, - "Env": null, - "Concurrency": null, - "EmbeddedConcurrency": null, - "Strategy": null, - "Jobs": [ + "ref": "contoso/templates/.github/workflows/build.yml@v1", + "jobs": [ { "type": "job", "id": "deploy", @@ -72,30 +59,19 @@ jobs: ] }, { - "Type": "reusableWorkflowJob", - "Id": "build2", - "Name": "build2", - "Needs": [], - "If": { + "type": "reusableWorkflowJob", + "id": "build2", + "name": "build2", + "needs": [], + "if": { "type": 3, "expr": "success()" }, - "Ref": "contoso/templates/.github/workflows/build.yml@v1", - "Permissions": { + "ref": "contoso/templates/.github/workflows/build.yml@v1", + "permissions": { "actions": "write" }, - "InputDefinitions": null, - "InputValues": null, - "SecretDefinitions": null, - "SecretValues": null, - "InheritSecrets": false, - "Outputs": null, - "Defaults": null, - "Env": null, - "Concurrency": null, - "EmbeddedConcurrency": null, - "Strategy": null, - "Jobs": [ + "jobs": [ { "type": "job", "id": "deploy", diff --git a/actions-workflow-parser/testdata/reader/reusable-workflow-job-permissions-overrides-default-limited-write.yml b/actions-workflow-parser/testdata/reader/reusable-workflow-job-permissions-overrides-default-limited-write.yml index b9a0e5d..ca3659b 100644 --- a/actions-workflow-parser/testdata/reader/reusable-workflow-job-permissions-overrides-default-limited-write.yml +++ b/actions-workflow-parser/testdata/reader/reusable-workflow-job-permissions-overrides-default-limited-write.yml @@ -1,7 +1,6 @@ include-source: false # Drop file/line/col from output skip: - Go - - TypeScript permissions-policy: Write --- on: push @@ -27,28 +26,16 @@ jobs: { "jobs": [ { - "Type": "reusableWorkflowJob", - "Id": "build", - "Name": "build", - "Needs": [], - "If": { + "type": "reusableWorkflowJob", + "id": "build", + "name": "build", + "needs": [], + "if": { "type": 3, "expr": "success()" }, - "Ref": "contoso/templates/.github/workflows/build.yml@v1", - "Permissions": null, - "InputDefinitions": null, - "InputValues": null, - "SecretDefinitions": null, - "SecretValues": null, - "InheritSecrets": false, - "Outputs": null, - "Defaults": null, - "Env": null, - "Concurrency": null, - "EmbeddedConcurrency": null, - "Strategy": null, - "Jobs": [ + "ref": "contoso/templates/.github/workflows/build.yml@v1", + "jobs": [ { "type": "job", "id": "deploy", @@ -72,30 +59,19 @@ jobs: ] }, { - "Type": "reusableWorkflowJob", - "Id": "build2", - "Name": "build2", - "Needs": [], - "If": { + "type": "reusableWorkflowJob", + "id": "build2", + "name": "build2", + "needs": [], + "if": { "type": 3, "expr": "success()" }, - "Ref": "contoso/templates/.github/workflows/build.yml@v1", - "Permissions": { + "ref": "contoso/templates/.github/workflows/build.yml@v1", + "permissions": { "actions": "write" }, - "InputDefinitions": null, - "InputValues": null, - "SecretDefinitions": null, - "SecretValues": null, - "InheritSecrets": false, - "Outputs": null, - "Defaults": null, - "Env": null, - "Concurrency": null, - "EmbeddedConcurrency": null, - "Strategy": null, - "Jobs": [ + "jobs": [ { "type": "job", "id": "deploy", 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 6833b2f..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 @@ -32,30 +31,19 @@ jobs: }, "jobs": [ { - "Type": "reusableWorkflowJob", - "Id": "build", - "Name": "build", - "Needs": [], - "If": { + "type": "reusableWorkflowJob", + "id": "build", + "name": "build", + "needs": [], + "if": { "type": 3, "expr": "success()" }, - "Ref": "contoso/templates/.github/workflows/build.yml@v1", - "Permissions": { + "ref": "contoso/templates/.github/workflows/build.yml@v1", + "permissions": { "actions": "read" }, - "InputDefinitions": null, - "InputValues": null, - "SecretDefinitions": null, - "SecretValues": null, - "InheritSecrets": false, - "Outputs": null, - "Defaults": null, - "Env": null, - "Concurrency": null, - "EmbeddedConcurrency": null, - "Strategy": null, - "Jobs": [ + "jobs": [ { "type": "job", "id": "deploy", @@ -82,30 +70,19 @@ jobs: ] }, { - "Type": "reusableWorkflowJob", - "Id": "build2", - "Name": "build2", - "Needs": [], - "If": { + "type": "reusableWorkflowJob", + "id": "build2", + "name": "build2", + "needs": [], + "if": { "type": 3, "expr": "success()" }, - "Ref": "contoso/templates/.github/workflows/build.yml@v1", - "Permissions": { + "ref": "contoso/templates/.github/workflows/build.yml@v1", + "permissions": { "actions": "write" }, - "InputDefinitions": null, - "InputValues": null, - "SecretDefinitions": null, - "SecretValues": null, - "InheritSecrets": false, - "Outputs": null, - "Defaults": null, - "Env": null, - "Concurrency": null, - "EmbeddedConcurrency": null, - "Strategy": null, - "Jobs": [ + "jobs": [ { "type": "job", "id": "deploy", diff --git a/actions-workflow-parser/testdata/reader/reusable-workflow-job-strategy.yml b/actions-workflow-parser/testdata/reader/reusable-workflow-job-strategy.yml index adbe218..c343684 100644 --- a/actions-workflow-parser/testdata/reader/reusable-workflow-job-strategy.yml +++ b/actions-workflow-parser/testdata/reader/reusable-workflow-job-strategy.yml @@ -1,7 +1,6 @@ include-source: false # Drop file/line/col from output skip: - Go - - TypeScript --- on: push jobs: @@ -31,17 +30,16 @@ jobs: { "jobs": [ { - "Type": "reusableWorkflowJob", - "Id": "build", - "Name": "build", - "Needs": [], - "If": { + "type": "reusableWorkflowJob", + "id": "build", + "name": "build", + "needs": [], + "if": { "type": 3, "expr": "success()" }, - "Ref": "contoso/templates/.github/workflows/build.yml@v1", - "Permissions": null, - "InputDefinitions": { + "ref": "contoso/templates/.github/workflows/build.yml@v1", + "input-definitions": { "type": 2, "map": [ { @@ -58,7 +56,7 @@ jobs: } ] }, - "InputValues": { + "input-values": { "type": 2, "map": [ { @@ -70,15 +68,7 @@ jobs: } ] }, - "SecretDefinitions": null, - "SecretValues": null, - "InheritSecrets": false, - "Outputs": null, - "Defaults": null, - "Env": null, - "Concurrency": null, - "EmbeddedConcurrency": null, - "Strategy": { + "strategy": { "type": 2, "map": [ { @@ -101,7 +91,7 @@ jobs: } ] }, - "Jobs": [ + "jobs": [ { "type": "job", "id": "build-it", diff --git a/actions-workflow-parser/testdata/reader/reusable-workflow-multiple.yml b/actions-workflow-parser/testdata/reader/reusable-workflow-multiple.yml index 4b4a31c..d129cdb 100644 --- a/actions-workflow-parser/testdata/reader/reusable-workflow-multiple.yml +++ b/actions-workflow-parser/testdata/reader/reusable-workflow-multiple.yml @@ -1,7 +1,6 @@ include-source: false # Drop file/line/col from output skip: - Go - - TypeScript --- on: push jobs: @@ -33,28 +32,16 @@ jobs: { "jobs": [ { - "Type": "reusableWorkflowJob", - "Id": "build", - "Name": "build", - "Needs": [], - "If": { + "type": "reusableWorkflowJob", + "id": "build", + "name": "build", + "needs": [], + "if": { "type": 3, "expr": "success()" }, - "Ref": "contoso/templates/.github/workflows/build.yml@v1", - "Permissions": null, - "InputDefinitions": null, - "InputValues": null, - "SecretDefinitions": null, - "SecretValues": null, - "InheritSecrets": false, - "Outputs": null, - "Defaults": null, - "Env": null, - "Concurrency": null, - "EmbeddedConcurrency": null, - "Strategy": null, - "Jobs": [ + "ref": "contoso/templates/.github/workflows/build.yml@v1", + "jobs": [ { "type": "job", "id": "deploy", @@ -78,28 +65,16 @@ jobs: ] }, { - "Type": "reusableWorkflowJob", - "Id": "build2", - "Name": "build2", - "Needs": [], - "If": { + "type": "reusableWorkflowJob", + "id": "build2", + "name": "build2", + "needs": [], + "if": { "type": 3, "expr": "success()" }, - "Ref": "contoso2/templates2/.github/workflows/build2.yml@v1", - "Permissions": null, - "InputDefinitions": null, - "InputValues": null, - "SecretDefinitions": null, - "SecretValues": null, - "InheritSecrets": false, - "Outputs": null, - "Defaults": null, - "Env": null, - "Concurrency": null, - "EmbeddedConcurrency": null, - "Strategy": null, - "Jobs": [ + "ref": "contoso2/templates2/.github/workflows/build2.yml@v1", + "jobs": [ { "type": "job", "id": "deploy2", 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 5550cd7..e07bb6b 100644 --- a/actions-workflow-parser/testdata/reader/reusable-workflow-no-inputs.yml +++ b/actions-workflow-parser/testdata/reader/reusable-workflow-no-inputs.yml @@ -1,7 +1,6 @@ include-source: false # Drop file/line/col from output skip: - Go - - TypeScript --- on: push jobs: @@ -21,28 +20,16 @@ jobs: { "jobs": [ { - "Type": "reusableWorkflowJob", - "Id": "build", - "Name": "build", - "Needs": [], - "If": { + "type": "reusableWorkflowJob", + "id": "build", + "name": "build", + "needs": [], + "if": { "type": 3, "expr": "success()" }, - "Ref": "contoso/templates/.github/workflows/build.yml@v1", - "Permissions": null, - "InputDefinitions": null, - "InputValues": null, - "SecretDefinitions": null, - "SecretValues": null, - "InheritSecrets": false, - "Outputs": null, - "Defaults": null, - "Env": null, - "Concurrency": null, - "EmbeddedConcurrency": null, - "Strategy": null, - "Jobs": [ + "ref": "contoso/templates/.github/workflows/build.yml@v1", + "jobs": [ { "type": "job", "id": "deploy", diff --git a/actions-workflow-parser/testdata/reader/reusable-workflow-outputs.yml b/actions-workflow-parser/testdata/reader/reusable-workflow-outputs.yml index 6ef098c..62501c2 100644 --- a/actions-workflow-parser/testdata/reader/reusable-workflow-outputs.yml +++ b/actions-workflow-parser/testdata/reader/reusable-workflow-outputs.yml @@ -1,7 +1,6 @@ include-source: false # Drop file/line/col from output skip: - Go - - TypeScript --- on: push jobs: @@ -27,22 +26,16 @@ jobs: { "jobs": [ { - "Type": "reusableWorkflowJob", - "Id": "build", - "Name": "build", - "Needs": [], - "If": { + "type": "reusableWorkflowJob", + "id": "build", + "name": "build", + "needs": [], + "if": { "type": 3, "expr": "success()" }, - "Ref": "contoso/templates/.github/workflows/build.yml@v1", - "Permissions": null, - "InputDefinitions": null, - "InputValues": null, - "SecretDefinitions": null, - "SecretValues": null, - "InheritSecrets": false, - "Outputs": { + "ref": "contoso/templates/.github/workflows/build.yml@v1", + "outputs": { "type": 2, "map": [ { @@ -66,12 +59,7 @@ jobs: } ] }, - "Defaults": null, - "Env": null, - "Concurrency": null, - "EmbeddedConcurrency": null, - "Strategy": null, - "Jobs": [ + "jobs": [ { "type": "job", "id": "job1", diff --git a/actions-workflow-parser/testdata/reader/reusable-workflow-secrets-secret-without-definition.yml b/actions-workflow-parser/testdata/reader/reusable-workflow-secrets-secret-without-definition.yml index 883d3d6..664f4fc 100644 --- a/actions-workflow-parser/testdata/reader/reusable-workflow-secrets-secret-without-definition.yml +++ b/actions-workflow-parser/testdata/reader/reusable-workflow-secrets-secret-without-definition.yml @@ -1,7 +1,6 @@ include-source: false # Drop file/line/col from output skip: - Go - - TypeScript --- on: push jobs: @@ -25,19 +24,16 @@ jobs: { "jobs": [ { - "Type": "reusableWorkflowJob", - "Id": "build", - "Name": "build", - "Needs": [], - "If": { + "type": "reusableWorkflowJob", + "id": "build", + "name": "build", + "needs": [], + "if": { "type": 3, "expr": "success()" }, - "Ref": "contoso/templates/.github/workflows/build.yml@v1", - "Permissions": null, - "InputDefinitions": null, - "InputValues": null, - "SecretDefinitions": { + "ref": "contoso/templates/.github/workflows/build.yml@v1", + "secret-definitions": { "type": 2, "map": [ { @@ -46,7 +42,7 @@ jobs: } ] }, - "SecretValues": { + "secret-values": { "type": 2, "map": [ { @@ -58,14 +54,7 @@ jobs: } ] }, - "InheritSecrets": false, - "Outputs": null, - "Defaults": null, - "Env": null, - "Concurrency": null, - "EmbeddedConcurrency": null, - "Strategy": null, - "Jobs": [ + "jobs": [ { "type": "job", "id": "deploy", diff --git a/actions-workflow-parser/testdata/reader/reusable-workflow-secrets.yml b/actions-workflow-parser/testdata/reader/reusable-workflow-secrets.yml index 40cda81..7714103 100644 --- a/actions-workflow-parser/testdata/reader/reusable-workflow-secrets.yml +++ b/actions-workflow-parser/testdata/reader/reusable-workflow-secrets.yml @@ -1,7 +1,6 @@ include-source: false # Drop file/line/col from output skip: - Go - - TypeScript --- on: push jobs: @@ -32,19 +31,16 @@ jobs: { "jobs": [ { - "Type": "reusableWorkflowJob", - "Id": "build", - "Name": "build", - "Needs": [], - "If": { + "type": "reusableWorkflowJob", + "id": "build", + "name": "build", + "needs": [], + "if": { "type": 3, "expr": "success()" }, - "Ref": "contoso/templates/.github/workflows/build.yml@v1", - "Permissions": null, - "InputDefinitions": null, - "InputValues": null, - "SecretDefinitions": { + "ref": "contoso/templates/.github/workflows/build.yml@v1", + "secret-definitions": { "type": 2, "map": [ { @@ -61,7 +57,7 @@ jobs: } ] }, - "SecretValues": { + "secret-values": { "type": 2, "map": [ { @@ -73,14 +69,7 @@ jobs: } ] }, - "InheritSecrets": false, - "Outputs": null, - "Defaults": null, - "Env": null, - "Concurrency": null, - "EmbeddedConcurrency": null, - "Strategy": null, - "Jobs": [ + "jobs": [ { "type": "job", "id": "deploy", @@ -104,19 +93,16 @@ jobs: ] }, { - "Type": "reusableWorkflowJob", - "Id": "build2", - "Name": "build2", - "Needs": [], - "If": { + "type": "reusableWorkflowJob", + "id": "build2", + "name": "build2", + "needs": [], + "if": { "type": 3, "expr": "success()" }, - "Ref": "contoso/templates/.github/workflows/build.yml@v1", - "Permissions": null, - "InputDefinitions": null, - "InputValues": null, - "SecretDefinitions": { + "ref": "contoso/templates/.github/workflows/build.yml@v1", + "secret-definitions": { "type": 2, "map": [ { @@ -133,15 +119,8 @@ jobs: } ] }, - "SecretValues": null, - "InheritSecrets": true, - "Outputs": null, - "Defaults": null, - "Env": null, - "Concurrency": null, - "EmbeddedConcurrency": null, - "Strategy": null, - "Jobs": [ + "inherit-secrets": true, + "jobs": [ { "type": "job", "id": "deploy", 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/step-id-generates-counter-per-collision.yml b/actions-workflow-parser/testdata/reader/step-id-generates-counter-per-collision.yml index 0713335..f588b88 100644 --- a/actions-workflow-parser/testdata/reader/step-id-generates-counter-per-collision.yml +++ b/actions-workflow-parser/testdata/reader/step-id-generates-counter-per-collision.yml @@ -6,10 +6,12 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 + - uses: Actions/Capitalized@v2 - uses: actions/setup-node@v2 - uses: docker://alpine:latest - run: echo hello - uses: actions/checkout@v2 + - uses: Actions/Capitalized@v2 - uses: actions/setup-node@v3 - uses: docker://alpine:latest - run: echo hello @@ -34,6 +36,14 @@ jobs: }, "uses": "actions/checkout@v2" }, + { + "id": "__Actions_Capitalized", + "if": { + "type": 3, + "expr": "success()" + }, + "uses": "Actions/Capitalized@v2" + }, { "id": "__actions_setup-node", "if": { @@ -66,6 +76,14 @@ jobs: }, "uses": "actions/checkout@v2" }, + { + "id": "__Actions_Capitalized_2", + "if": { + "type": 3, + "expr": "success()" + }, + "uses": "Actions/Capitalized@v2" + }, { "id": "__actions_setup-node_2", "if": { 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/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-bool.yml b/actions-workflow-parser/testdata/reader/yaml-schema-bool.yml index b0bbd06..9100be9 100644 --- a/actions-workflow-parser/testdata/reader/yaml-schema-bool.yml +++ b/actions-workflow-parser/testdata/reader/yaml-schema-bool.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/yaml-schema-exceptions.yml b/actions-workflow-parser/testdata/reader/yaml-schema-exceptions.yml new file mode 100644 index 0000000..70de47f --- /dev/null +++ b/actions-workflow-parser/testdata/reader/yaml-schema-exceptions.yml @@ -0,0 +1,77 @@ +include-source: false # Drop file/line/col from output +--- +on: push +env: + UNDERSCORED_INT_AS_STRING: 12_345 + UNDERSCORED_FLOAT_AS_STRING: 23_456.789_321 +jobs: + build: + runs-on: ubuntu-latest + strategy: + matrix: + vector-1: + - 12_345 + - 23_456.789_321 + steps: + - run: echo hi +--- +{ + "env": { + "type": 2, + "map": [ + { + "Key": "UNDERSCORED_INT_AS_STRING", + "Value": "12_345" + }, + { + "Key": "UNDERSCORED_FLOAT_AS_STRING", + "Value": "23_456.789_321" + } + ] + }, + "jobs": [ + { + "type": "job", + "id": "build", + "name": "build", + "if": { + "type": 3, + "expr": "success()" + }, + "strategy": { + "type": 2, + "map": [ + { + "Key": "matrix", + "Value": { + "type": 2, + "map": [ + { + "Key": "vector-1", + "Value": { + "type": 1, + "seq": [ + "12_345", + "23_456.789_321" + ] + } + } + ] + } + } + ] + }, + "runs-on": "ubuntu-latest", + "steps": [ + { + "id": "__run", + "if": { + "type": 3, + "expr": "success()" + }, + "run": "echo hi" + } + ] + } + ] +} diff --git a/actions-workflow-parser/testdata/reader/yaml-schema-float.yml b/actions-workflow-parser/testdata/reader/yaml-schema-float.yml index 2531ab8..247833d 100644 --- a/actions-workflow-parser/testdata/reader/yaml-schema-float.yml +++ b/actions-workflow-parser/testdata/reader/yaml-schema-float.yml @@ -1,7 +1,4 @@ include-source: false # Drop file/line/col from output -skip: - - Go - - 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 c571fa3..a6189c4 100644 --- a/actions-workflow-parser/testdata/reader/yaml-schema-int.yml +++ b/actions-workflow-parser/testdata/reader/yaml-schema-int.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/yaml-schema-null.yml b/actions-workflow-parser/testdata/reader/yaml-schema-null.yml index 86d09a0..0e73a48 100644 --- a/actions-workflow-parser/testdata/reader/yaml-schema-null.yml +++ b/actions-workflow-parser/testdata/reader/yaml-schema-null.yml @@ -1,7 +1,4 @@ include-source: false # Drop file/line/col from output -skip: - - Go - - TypeScript --- on: push jobs: diff --git a/actions-workflow-parser/testdata/reader/yaml-schema-sequence.yml b/actions-workflow-parser/testdata/reader/yaml-schema-sequence.yml index c285c3e..5a8f525 100644 --- a/actions-workflow-parser/testdata/reader/yaml-schema-sequence.yml +++ b/actions-workflow-parser/testdata/reader/yaml-schema-sequence.yml @@ -1,7 +1,4 @@ include-source: false # Drop file/line/col from output -skip: - - Go - - TypeScript --- on: push jobs: diff --git a/actions-workflow-parser/testdata/reader/yaml-schema-str-block-styles.yml b/actions-workflow-parser/testdata/reader/yaml-schema-str-block-styles.yml index e474ae6..026d4ef 100644 --- a/actions-workflow-parser/testdata/reader/yaml-schema-str-block-styles.yml +++ b/actions-workflow-parser/testdata/reader/yaml-schema-str-block-styles.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/yaml-schema-str-flow-styles.yml b/actions-workflow-parser/testdata/reader/yaml-schema-str-flow-styles.yml index 092a72f..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,7 +1,4 @@ include-source: false # Drop file/line/col from output -skip: - - Go - - TypeScript --- on: push jobs: @@ -35,7 +32,7 @@ jobs: # Customer-breaking change we discovered when upgrading from YamlDotNet.Signed 6.0.0 to YamlDotNet 12.0.2. # YamlDotNet 12.0.2 produces the error "While scanning a multi-line double-quoted scalar, found wrong indentation." - - "hello + - "hello world" steps: diff --git a/actions-workflow-parser/testdata/reader/yaml-schema-string.yml b/actions-workflow-parser/testdata/reader/yaml-schema-string.yml index 41ed76d..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: @@ -12,6 +10,14 @@ jobs: dot: . single-quoted-number: '8' double-quoted-number: "9" + hex-number: 0xCB2431 + hex-string: "0xCB2431" + # binary-number: 0b10100111001 // Binary numbers are not supported by C# at the moment + # binary-string: "0b1111" + octal-number: 0o1234567 + octal-string: "0o1234567" + python-version: >- + 3.10 --- { "jobs": [ @@ -46,6 +52,26 @@ jobs: { "Key": "double-quoted-number", "Value": "9" + }, + { + "Key": "hex-number", + "Value": "13313073" + }, + { + "Key": "hex-string", + "Value": "0xCB2431" + }, + { + "Key": "octal-number", + "Value": "342391" + }, + { + "Key": "octal-string", + "Value": "0o1234567" + }, + { + "Key": "python-version", + "Value": "3.10" } ] } diff --git a/actions-workflow-parser/testdata/reader/yaml-schema-timestamp.yml b/actions-workflow-parser/testdata/reader/yaml-schema-timestamp.yml index 26ab729..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: