Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

improve acc tests #430

Merged
merged 2 commits into from May 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
41 changes: 21 additions & 20 deletions .github/workflows/test.yml
Expand Up @@ -6,9 +6,18 @@ on:
pull_request:
paths-ignore:
- 'README.md'
- 'docs/**'
- 'examples/**'
- 'templates/**'
push:
branches:
- main
- "release/**"
paths-ignore:
- 'README.md'
- 'docs/**'
- 'examples/**'
- 'templates/**'
# For systems with an upstream API that could drift unexpectedly (like most SaaS systems, etc.),
# we recommend testing at a regular interval not necessarily tied to code changes. This will
# ensure you are alerted to something breaking due to an API change, even if the code did not
Expand Down Expand Up @@ -72,42 +81,34 @@ jobs:
matrix:
# list whatever Terraform versions here you would like to support
terraform:
- '0.15.*'
- '1.0.*'
- '1.1.*'
- '1.2.*'
- '1.3.*'
- '1.4.*'
- '1.5.*'
- '1.6.*'
- '1.7.*'
- '1.8.*'
harbor:
- '1.14.*' # harbor 2.10
- '1.13.*' # harbor 2.9
- '1.12.*' # harbor 2.8
steps:

- name: Check out code into the Go module directory
uses: actions/checkout@v4

- name: Setup Docker
uses: docker-practice/actions-setup-docker@v1
with:
docker_version: "24.0"
docker_channel: stable
docker_daemon_json: '{"insecure-registries":["0.0.0.0/0"]}'

- name: Create kind cluster
uses: helm/kind-action@v1.9.0
with:
version: v0.20.0
node_image: kindest/node:v1.28.0
cluster_name: kind-cluster-v1.28.0
version: v0.21.0
node_image: kindest/node:v1.29.0
cluster_name: kind-cluster-v1.29.0
config: kind-cluster.yaml

- name: Install Nginx ingress controller
run: |
kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/controller-v1.0.3/deploy/static/provider/kind/deploy.yaml
kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/controller-v1.10.0/deploy/static/provider/kind/deploy.yaml
kubectl wait --namespace ingress-nginx --for=condition=ready pod --selector=app.kubernetes.io/component=controller --timeout=120s

- uses: azure/setup-helm@v4
with:
version: 'latest' # default is latest (stable)
token: ${{ secrets.GITHUB_TOKEN }} # only needed if version is 'latest'
id: install

- name: Install Harbor Helm chart
Expand All @@ -118,7 +119,7 @@ jobs:
--set expose.tls.enabled="false" \
--set expose.ingress.hosts.core="harbor.local" \
--set expose.ingress.hosts.notary="harbor.local" \
harbor/harbor
harbor/harbor --version ${{ matrix.harbor }}

- name: Set /etc/hosts
run: |
Expand Down
16 changes: 16 additions & 0 deletions README.md
Expand Up @@ -11,6 +11,22 @@ Configure and manage Harbor with Terraform and [Pulumi](https://github.com/pulum
## Usage
[See the docs for usage information](./docs).

## Compatibility and Acceptance Tests

Our acceptance tests are run against specific versions of Harbor and Terraform to ensure compatibility.
For the latest version of the provider, we ran the tests against the following versions of Harbor and Terraform:
### Harbor Versions
- `2.8`
- `2.9`
- `2.10`

### Terraform Versions
- `1.6`
- `1.7`
- `1.8`

Please note that while we strive to maintain compatibility with these versions, we recommend always using the latest versions of Harbor and Terraform for the best experience.

## Contributing
Everyone is welcome to contribute to this repository. Feel free to raise [issues](https://github.com/goharbor/terraform-provider-harbor/issues) or to submit [Pull Requests.](https://github.com/goharbor/terraform-provider-harbor/pulls)

Expand Down