feat: Added str_startswith. #1184
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
| --- | |
| # This workflow uses actions that are not certified by GitHub. They are provided | |
| # by a third-party and are governed by separate terms of service, privacy | |
| # policy, and support documentation. | |
| name: Tests | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: read | |
| jobs: | |
| mutation: | |
| runs-on: ubuntu-latest | |
| name: Mutation | |
| steps: | |
| - name: Harden Runner | |
| uses: step-security/harden-runner@95d9a5deda9de15063e7595e9719c11c38c90ae2 # v2.13.2 | |
| with: | |
| disable-sudo: true | |
| egress-policy: block | |
| allowed-endpoints: > | |
| api.cloudflare.com:443 | |
| api.deps.dev:443 | |
| api.github.com:443 | |
| api.gumroad.com:443 | |
| api.osv.dev:443 | |
| api.scorecard.dev:443 | |
| api.securityscorecards.dev:443 | |
| checkpoint-api.hashicorp.com:443 | |
| fulcio.sigstore.dev:443 | |
| ghcr.io:443 | |
| github.com:443 | |
| gitlab.com:443 | |
| golang.org:443 | |
| goreleaser.com:443 | |
| objects.githubusercontent.com:443 | |
| oss-fuzz-build-logs.storage.googleapis.com:443 | |
| osv-vulnerabilities.storage.googleapis.com:443 | |
| pkg-containers.githubusercontent.com:443 | |
| proxy.golang.org:443 | |
| registry.npmjs.org:443 | |
| rekor.sigstore.dev:443 | |
| releases.hashicorp.com:443 | |
| release-assets.githubusercontent.com:443 | |
| storage.googleapis.com:443 | |
| sum.golang.org:443 | |
| tuf-repo-cdn.sigstore.dev:443 | |
| uploads.github.com:443 | |
| vuln.go.dev:443 | |
| www.bestpractices.dev:443 | |
| - name: Checkout Source | |
| uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 | |
| with: | |
| fetch-depth: 0 | |
| - name: Install Go | |
| uses: actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c # v6.1.0 | |
| with: | |
| go-version: ">= 1.25" | |
| cache: true | |
| - name: Run mutation tests | |
| run: | | |
| cd ./corefunc && GOEXPERIMENT=greenteagc,jsonv2 go test \ | |
| -tags=mutation -count=1 -parallel=$(nproc) -timeout 30s -ooze.v=true \ | |
| | grep -v "^[[:lower:]]" | grep -v "^)" | |
| unit: | |
| runs-on: ubuntu-latest | |
| name: Unit | |
| steps: | |
| - name: Harden Runner | |
| uses: step-security/harden-runner@95d9a5deda9de15063e7595e9719c11c38c90ae2 # v2.13.2 | |
| with: | |
| disable-sudo: true | |
| egress-policy: block #audit | |
| allowed-endpoints: > | |
| api.cloudflare.com:443 | |
| api.deps.dev:443 | |
| api.github.com:443 | |
| api.gumroad.com:443 | |
| api.osv.dev:443 | |
| api.scorecard.dev:443 | |
| api.securityscorecards.dev:443 | |
| checkpoint-api.hashicorp.com:443 | |
| fulcio.sigstore.dev:443 | |
| ghcr.io:443 | |
| github.com:443 | |
| gitlab.com:443 | |
| golang.org:443 | |
| goreleaser.com:443 | |
| objects.githubusercontent.com:443 | |
| oss-fuzz-build-logs.storage.googleapis.com:443 | |
| osv-vulnerabilities.storage.googleapis.com:443 | |
| pkg-containers.githubusercontent.com:443 | |
| proxy.golang.org:443 | |
| registry.npmjs.org:443 | |
| rekor.sigstore.dev:443 | |
| releases.hashicorp.com:443 | |
| release-assets.githubusercontent.com:443 | |
| storage.googleapis.com:443 | |
| sum.golang.org:443 | |
| tuf-repo-cdn.sigstore.dev:443 | |
| uploads.github.com:443 | |
| vuln.go.dev:443 | |
| www.bestpractices.dev:443 | |
| - name: Checkout Source | |
| uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 | |
| with: | |
| fetch-depth: 0 | |
| - name: Install Go | |
| uses: actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c # v6.1.0 | |
| with: | |
| go-version: ">= 1.25" | |
| cache: true | |
| - name: Run unit tests | |
| run: | | |
| GOEXPERIMENT=greenteagc,jsonv2 go test -count=1 -parallel=$(nproc) -timeout 30s -v ./corefunc/... | |
| acc_terraform: | |
| runs-on: ubuntu-latest | |
| name: Acceptance (Terraform ${{ matrix.terraform_version }}) | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| terraform_version: | |
| - "1.0" | |
| - "1.1" | |
| - "1.2" | |
| - "1.3" | |
| - "1.4" | |
| - "1.5" | |
| - "1.6" | |
| - "1.7" | |
| - "1.8" | |
| - "1.9" | |
| - "1.10" | |
| - "1.11" | |
| - "1.12" | |
| - "1.13" | |
| - "1.14" | |
| steps: | |
| - name: Harden Runner | |
| uses: step-security/harden-runner@95d9a5deda9de15063e7595e9719c11c38c90ae2 # v2.13.2 | |
| with: | |
| disable-sudo: true | |
| egress-policy: block # audit | |
| allowed-endpoints: > | |
| api.cloudflare.com:443 | |
| api.deps.dev:443 | |
| api.github.com:443 | |
| api.gumroad.com:443 | |
| api.osv.dev:443 | |
| api.scorecard.dev:443 | |
| api.securityscorecards.dev:443 | |
| checkpoint-api.hashicorp.com:443 | |
| fulcio.sigstore.dev:443 | |
| get.opentofu.org:443 | |
| ghcr.io:443 | |
| github.com:443 | |
| gitlab.com:443 | |
| golang.org:443 | |
| goreleaser.com:443 | |
| objects.githubusercontent.com:443 | |
| oss-fuzz-build-logs.storage.googleapis.com:443 | |
| osv-vulnerabilities.storage.googleapis.com:443 | |
| pkg-containers.githubusercontent.com:443 | |
| proxy.golang.org:443 | |
| registry.npmjs.org:443 | |
| rekor.sigstore.dev:443 | |
| releases.hashicorp.com:443 | |
| release-assets.githubusercontent.com:443 | |
| storage.googleapis.com:443 | |
| sum.golang.org:443 | |
| tuf-repo-cdn.sigstore.dev:443 | |
| uploads.github.com:443 | |
| vuln.go.dev:443 | |
| www.bestpractices.dev:443 | |
| - name: Checkout Source | |
| uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 | |
| with: | |
| fetch-depth: 0 | |
| - name: Install Go | |
| uses: actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c # v6.1.0 | |
| with: | |
| go-version: ">= 1.25" | |
| cache: true | |
| - name: Install Terraform ${{ matrix.terraform_version }} | |
| uses: hashicorp/setup-terraform@b9cd54a3c349d3f38e8881555d616ced269862dd # v3.1.2 | |
| with: | |
| terraform_version: ${{ matrix.terraform_version }} | |
| terraform_wrapper: false | |
| - name: Run acceptance tests | |
| env: | |
| TF_ACC: 1 | |
| run: | | |
| GOEXPERIMENT=greenteagc,jsonv2 go test \ | |
| -run=TestAcc -count=1 -parallel=$(nproc) -timeout 30m -v ./corefuncprovider/... | |
| acc_opentofu: | |
| runs-on: ubuntu-latest | |
| name: Acceptance (OpenTofu ${{ matrix.opentofu_version }}) | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| opentofu_version: | |
| - "1.6" | |
| - "1.7" | |
| - "1.8" | |
| - "1.9" | |
| - "1.10" | |
| # - "1.11" | |
| steps: | |
| - name: Harden Runner | |
| uses: step-security/harden-runner@95d9a5deda9de15063e7595e9719c11c38c90ae2 # v2.13.2 | |
| with: | |
| disable-sudo: true | |
| egress-policy: block # audit | |
| allowed-endpoints: > | |
| api.cloudflare.com:443 | |
| api.deps.dev:443 | |
| api.github.com:443 | |
| api.gumroad.com:443 | |
| api.osv.dev:443 | |
| api.scorecard.dev:443 | |
| api.securityscorecards.dev:443 | |
| checkpoint-api.hashicorp.com:443 | |
| fulcio.sigstore.dev:443 | |
| get.opentofu.org:443 | |
| ghcr.io:443 | |
| github.com:443 | |
| gitlab.com:443 | |
| golang.org:443 | |
| goreleaser.com:443 | |
| objects.githubusercontent.com:443 | |
| oss-fuzz-build-logs.storage.googleapis.com:443 | |
| osv-vulnerabilities.storage.googleapis.com:443 | |
| pkg-containers.githubusercontent.com:443 | |
| proxy.golang.org:443 | |
| registry.npmjs.org:443 | |
| rekor.sigstore.dev:443 | |
| releases.hashicorp.com:443 | |
| release-assets.githubusercontent.com:443 | |
| storage.googleapis.com:443 | |
| sum.golang.org:443 | |
| tuf-repo-cdn.sigstore.dev:443 | |
| uploads.github.com:443 | |
| vuln.go.dev:443 | |
| www.bestpractices.dev:443 | |
| - name: Checkout Source | |
| uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 | |
| with: | |
| fetch-depth: 0 | |
| - name: Install Go | |
| uses: actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c # v6.1.0 | |
| with: | |
| go-version: ">= 1.25" | |
| cache: true | |
| - name: Install OpenTofu ${{ matrix.opentofu_version }} | |
| uses: opentofu/setup-opentofu@000eeb8522f0572907c393e8151076c205fdba1b # v1.0.6 | |
| with: | |
| tofu_version: ~${{ matrix.opentofu_version }} | |
| tofu_wrapper: false | |
| - name: Run acceptance tests | |
| env: | |
| TF_ACC: 1 | |
| TF_ACC_PROVIDER_NAMESPACE: hashicorp | |
| TF_ACC_PROVIDER_HOST: registry.opentofu.org | |
| run: | | |
| TF_ACC_TERRAFORM_PATH=$(which tofu) \ | |
| GOEXPERIMENT=greenteagc,jsonv2 go test \ | |
| -run=TestAcc -count=1 -parallel=$(nproc) -timeout 30m -v ./corefuncprovider/... |