diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index 7d4cf94..7bc7a5d 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -2,6 +2,9 @@ name: Integration on: push: + branches: + - main + pull_request: concurrency: group: ${{ github.workflow }}-${{ github.ref }} @@ -21,6 +24,7 @@ jobs: - name: 'Option test' uses: ./ with: + version: "v0.122.1" command: run path_pattern: testdata/path/to/*.yml debug: true @@ -30,6 +34,8 @@ jobs: shuffle: true concurrent: true enable-run-exec-scope: true + enable-read-remote-scope: true + enable-read-parent-scope: true labels: "integration,integration_http" env: # Override parameters in scenario with environment variables diff --git a/action.yml b/action.yml index 909c97f..e023a55 100644 --- a/action.yml +++ b/action.yml @@ -18,7 +18,7 @@ inputs: version: description: Specify runn version required: false - default: latest + default: "v0.120.0" debug: description: Filter runbooks to be executed required: false @@ -43,6 +43,10 @@ inputs: description: Concurrent mode required: false default: false + enable-read-parent-scope: + description: Required for reading parent files.(`--scopes read:parent`) + required: false + default: false enable-read-remote-scope: description: Required for reading remote files.(`--scopes read:remote`) required: false @@ -118,7 +122,7 @@ runs: ${{ (inputs.skip-test == 'true' && '--skip-test') || '' }} \ ${{ (inputs.shuffle == 'true' && '--shuffle on') || '' }} \ ${{ (inputs.concurrent == 'true' && '--concurrent on') || '' }} \ - ${{ (inputs.enable-read-remote-scope == 'true' && inputs.enable-run-exec-scope == 'true' && '--scopes read:remote,run:exec') || '' }} \ - ${{ (inputs.enable-read-remote-scope == 'true' && inputs.enable-run-exec-scope == 'false' && '--scopes read:remote') || '' }} \ - ${{ (inputs.enable-read-remote-scope == 'false' && inputs.enable-run-exec-scope == 'true' && '--scopes run:exec') || '' }} \ + ${{ (inputs.enable-read-parent-scope == 'true' && '--scopes read:parent') || '' }} \ + ${{ (inputs.enable-read-remote-scope == 'true' && '--scopes read:remote') || '' }} \ + ${{ (inputs.enable-run-exec-scope == 'true' && '--scopes run:exec') || '' }} \ $LABEL_OPTIONS diff --git a/testdata/path/hello.yml b/testdata/path/hello.yml new file mode 100644 index 0000000..ff6c07c --- /dev/null +++ b/testdata/path/hello.yml @@ -0,0 +1,7 @@ +desc: Parent runbook +labels: + - integration +steps: + - + test: | + len('hello') == 5 diff --git a/testdata/path/to/parent.yml b/testdata/path/to/parent.yml new file mode 100644 index 0000000..9653226 --- /dev/null +++ b/testdata/path/to/parent.yml @@ -0,0 +1,7 @@ +desc: Parent include sample +labels: + - integration +steps: + - + include: + path: ../hello.yml diff --git a/testdata/path/to/remote.yml b/testdata/path/to/remote.yml index 9cd196d..41dc0b6 100644 --- a/testdata/path/to/remote.yml +++ b/testdata/path/to/remote.yml @@ -1,7 +1,6 @@ desc: Remote include sample labels: - integration -if: false steps: - include: