internal/controller: handle the case of Atlas returning multiple results #1126
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
# Copyright 2023 The Atlas Operator Authors. | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# | |
# Unless required by applicable law or agreed to in writing, software | |
# distributed under the License is distributed on an "AS IS" BASIS, | |
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
# See the License for the specific language governing permissions and | |
# limitations under the License. | |
name: Integration Tests | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
jobs: | |
unit: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-go@v5 | |
with: | |
go-version-file: 'go.mod' | |
- name: Install Atlas CLI | |
uses: ariga/setup-atlas@master | |
- name: Generate | |
run: | | |
make cli-gen | |
- name: Run Go mod tidy | |
run: go mod tidy | |
- name: Verify generated files are checked in properly | |
run: | | |
status=$(git status --porcelain) | |
if [ -n "$status" ]; then | |
echo "you need to run 'make cli-gen' and commit the changes" | |
echo "$status" | |
exit 1 | |
fi | |
- name: Run tests | |
run: | | |
make test | |
e2e: | |
runs-on: ubuntu-latest | |
needs: [unit] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-go@v5 | |
with: | |
go-version-file: 'go.mod' | |
- name: Create k8s Kind Cluster | |
uses: helm/kind-action@v1 | |
- name: Install Skaffold | |
run: | | |
curl -Lo skaffold https://storage.googleapis.com/skaffold/releases/v2.3.1/skaffold-linux-amd64 && \ | |
sudo install skaffold /usr/local/bin/ | |
- name: Run e2e tests | |
run: | | |
make test-e2e \ | |
ATLAS_TOKEN=${{ secrets.ATLAS_TOKEN }} \ | |
KIND_CLUSTER=chart-testing |