fix(plugin): Handle spaces in the plugin command path #1291
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: pr | |
| on: [pull_request] | |
| permissions: {} | |
| jobs: | |
| lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: checkout all PR branch and commits | |
| uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # ratchet:actions/checkout@v5 | |
| with: | |
| ref: ${{ github.event.pull_request.head.sha }} | |
| fetch-depth: ${{ github.event.pull_request.commits }} | |
| - name: setup go | |
| uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # ratchet:actions/setup-go@v6 | |
| with: | |
| go-version: "1.25.x" | |
| cache: false | |
| - name: validate conventional commit prefix | |
| working-directory: scripts | |
| run: ./validate-conventional-commit-prefix.sh | |
| - name: golangci-lint | |
| uses: golangci/golangci-lint-action@4afd733a84b1f43292c63897423277bb7f4313a9 # ratchet:golangci/golangci-lint-action@v8 | |
| with: | |
| args: --timeout=5m --color=always --max-same-issues=0 --max-issues-per-linter=0 | |
| - name: setup regal | |
| uses: StyraInc/setup-regal@33a142b1189004e0f14bf42b15972c67eecce776 # ratchet:StyraInc/setup-regal@v1 | |
| with: | |
| version: v0.30 | |
| - name: lint examples - warnings | |
| continue-on-error: true # Regal returns non-zero even with fail-level set to warning. | |
| run: >- | |
| regal lint | |
| examples | |
| --disable directory-package-mismatch | |
| --disable unresolved-import | |
| --format github | |
| - name: lint examples - blocking | |
| run: >- | |
| regal lint | |
| examples | |
| --disable-all | |
| --enable-category bugs | |
| --format github | |
| - name: ratchet | |
| uses: sethvargo/ratchet@8b4ca256dbed184350608a3023620f267f0a5253 # ratchet:sethvargo/ratchet@main | |
| with: | |
| files: .github/workflows/*.yaml | |
| validate: | |
| strategy: | |
| matrix: | |
| os: | |
| - 'ubuntu-latest' | |
| - 'macos-latest' | |
| - 'windows-latest' | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - name: checkout source | |
| uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # ratchet:actions/checkout@v5 | |
| - name: setup go | |
| uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # ratchet:actions/setup-go@v6 | |
| with: | |
| go-version: "1.25.x" | |
| cache: false | |
| - name: build | |
| run: make build | |
| - name: unit test | |
| run: make test | |
| # Ensure Actions runner has Python installed | |
| # This is required for pre-commit tests to work | |
| - name: setup python | |
| uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # ratchet:actions/setup-python@v6 | |
| with: | |
| python-version: '3.13' | |
| cache: 'pip' | |
| - name: setup bats | |
| uses: bats-core/bats-action@42fcc8700f773c075a16a90eb11674c0318ad507 # ratchet:bats-core/[email protected] | |
| with: | |
| # Pin bats version to fix CI issue: https://github.com/bats-core/bats-action/pull/4 | |
| bats-version: "1.10.0" | |
| support-install: false | |
| assert-install: false | |
| detik-install: false | |
| file-install: false | |
| - name: test examples (nix) | |
| if: ${{ matrix.os != 'windows-latest' }} | |
| run: make test-examples | |
| - name: test examples (windows) | |
| if: ${{ matrix.os == 'windows-latest' }} | |
| run: | | |
| $env:Path += ";C:\Users\runneradmin\.local\share\bats\bin" | |
| make test-examples | |
| - name: acceptance (*nix) | |
| if: ${{ matrix.os != 'windows-latest' }} | |
| run: make test-acceptance | |
| # TODO: Uncomment as a part of https://github.com/open-policy-agent/conftest/issues/1203 | |
| # - name: acceptance (windows) | |
| # if: ${{ matrix.os == 'windows-latest' }} | |
| # run: | | |
| # $env:Path += ";C:\Users\runneradmin\.local\share\bats\bin" | |
| # make test-acceptance | |
| - name: test oci push/pull | |
| if: ${{ matrix.os == 'ubuntu-latest' }} | |
| run: ./scripts/push-pull-e2e.sh |