fix: ignore statement action order when comparing policy documents (#12) #32
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: Test | |
on: | |
pull_request: | |
branches: | |
- main | |
push: | |
branches: | |
- main | |
permissions: | |
contents: read | |
jobs: | |
# Ensure project builds before running testing matrix | |
build: | |
name: Build | |
runs-on: ubuntu-latest | |
timeout-minutes: 5 | |
steps: | |
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1 | |
- uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 | |
with: | |
go-version-file: 'go.mod' | |
cache: true | |
- run: go mod download | |
- run: go build -v . | |
- name: Run linters | |
uses: golangci/golangci-lint-action@971e284b6050e8a5849b72094c50ab08da042db8 # v6.1.1 | |
with: | |
version: latest | |
test-upcloud: | |
name: Acceptance Tests (UpCloud) | |
needs: build | |
runs-on: ubuntu-latest | |
timeout-minutes: 15 | |
steps: | |
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1 | |
- uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 | |
with: | |
go-version-file: 'go.mod' | |
cache: true | |
- uses: hashicorp/setup-terraform@b9cd54a3c349d3f38e8881555d616ced269862dd # v3.1.2 | |
with: | |
terraform_wrapper: false | |
- run: go mod download | |
- env: | |
TF_ACC: "1" | |
OBJSTO_ACCESS_KEY: ${{ secrets.UPCLOUD_ACCESS_KEY }} | |
OBJSTO_SECRET_KEY: ${{ secrets.UPCLOUD_SECRET_KEY }} | |
OBJSTO_ENDPOINT: ${{ secrets.UPCLOUD_ENDPOINT }} | |
OBJSTO_REGION: ${{ secrets.UPCLOUD_REGION }} | |
run: go test -v -cover ./internal/provider/ | |
timeout-minutes: 10 | |
test-minio: | |
name: Acceptance Tests (Minio) | |
needs: build | |
runs-on: ubuntu-latest | |
timeout-minutes: 15 | |
steps: | |
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1 | |
- uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 | |
with: | |
go-version-file: 'go.mod' | |
cache: true | |
- uses: hashicorp/setup-terraform@b9cd54a3c349d3f38e8881555d616ced269862dd # v3.1.2 | |
with: | |
terraform_wrapper: false | |
- run: go mod download | |
- env: | |
TF_ACC: "1" | |
OBJSTO_ACCESS_KEY: access_key | |
OBJSTO_SECRET_KEY: secret_key | |
OBJSTO_ENDPOINT: http://localhost:9000 | |
OBJSTO_REGION: local-1 | |
run: | | |
docker run -d -e MINIO_ROOT_USER=access_key -e MINIO_ROOT_PASSWORD=secret_key -e MINIO_BROWSER=off -p 9000:9000 minio/minio:RELEASE.2024-11-07T00-52-20Z server /data | |
go test -v -cover ./internal/provider/ | |
timeout-minutes: 10 | |
test-moto: | |
name: Acceptance Tests (moto) | |
needs: build | |
runs-on: ubuntu-latest | |
timeout-minutes: 15 | |
steps: | |
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1 | |
- uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 | |
with: | |
go-version-file: 'go.mod' | |
cache: true | |
- uses: hashicorp/setup-terraform@b9cd54a3c349d3f38e8881555d616ced269862dd # v3.1.2 | |
with: | |
terraform_wrapper: false | |
- run: go mod download | |
- env: | |
TF_ACC: "1" | |
OBJSTO_ACCESS_KEY: access_key | |
OBJSTO_SECRET_KEY: secret_key | |
OBJSTO_ENDPOINT: http://localhost:5000 | |
OBJSTO_REGION: us-east-1 | |
run: | | |
docker run -d -e MOTO_S3_ALLOW_CROSSACCOUNT_ACCESS=false -e MOTO_IAM_LOAD_MANAGED_POLICIES=false -e MOTO_EC2_LOAD_DEFAULT_AMIS=false -p 5000:5000 motoserver/moto:5.0.21 | |
go test -v -cover ./internal/provider/ | |
timeout-minutes: 10 |