Skip to content

Commit

Permalink
improve acc tests
Browse files Browse the repository at this point in the history
Signed-off-by: flbla <flbla@users.noreply.github.com>
  • Loading branch information
flbla committed Apr 17, 2024
1 parent 9816f22 commit db835d3
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 20 deletions.
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

0 comments on commit db835d3

Please sign in to comment.