chore: Update all examples to OPA V1 syntax #928
Workflow file for this run
This file contains 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: | |
actions: read | |
checks: none | |
contents: none | |
deployments: none | |
issues: none | |
packages: none | |
pull-requests: none | |
repository-projects: none | |
security-events: none | |
statuses: none | |
jobs: | |
style: | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout all PR branch and commits | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.event.pull_request.head.sha }} | |
fetch-depth: ${{ github.event.pull_request.commits }} | |
- name: validate conventional commit prefix | |
working-directory: scripts | |
run: ./validate-conventional-commit-prefix.sh | |
- name: setup regal | |
uses: 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 | |
validate: | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout source | |
uses: actions/checkout@v4 | |
- name: setup go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: "1.23.x" | |
cache: false | |
- name: golangci-lint | |
uses: golangci/golangci-lint-action@v6 | |
with: | |
args: --timeout=5m --color=always --max-same-issues=0 --max-issues-per-linter=0 | |
- name: build | |
run: make build | |
- name: unit test | |
run: make test | |
- name: setup bats | |
uses: 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 | |
run: make test-examples | |
- name: acceptance | |
run: make test-acceptance | |
- name: test oci push/pull | |
run: ./scripts/push-pull-e2e.sh |