Skip to content

Commit

Permalink
🌱 oil the pr ci workflow
Browse files Browse the repository at this point in the history
Signed-off-by: David Zager <[email protected]>
  • Loading branch information
djzager committed Jul 5, 2024
1 parent b3dd69d commit 49ca65b
Showing 1 changed file with 26 additions and 39 deletions.
65 changes: 26 additions & 39 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,88 +12,75 @@ jobs:
fmt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: actions/setup-go@v3
with:
go-version: '1.19'
- run: make fmt

vet:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: actions/setup-go@v3
with:
go-version: '1.19'
- run: make vet

build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: actions/setup-go@v3
with:
go-version: '1.19'
- run: make cmd
build-image:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: make podman-build

test-unit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: actions/setup-go@v3
with:
go-version: '1.19'
- run: make test

test-api:
needs:
- fmt
- vet
- build
- test-unit
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: actions/setup-go@v3
with:
go-version: '1.19'
- run: |
make vet
DISCONNECTED=1 make run &
sleep 15 # probably a dirty solution
DISCONNECTED=1 HUB_BASE_URL=http://localhost:8080 make test-api
DISCONNECTED=1 HUB_BASE_URL=http://localhost:8080 make test-api # Intentionaly run 2x to catch data left in Hub DB.
test-e2e:
build-image:
needs:
- fmt
- vet
- build
- test-unit
- test-api
runs-on: ubuntu-latest
env:
IMG: ttl.sh/konveyor-hub-${{ github.sha }}:2h
steps:
- uses: actions/checkout@v3
- name: start-minikube
uses: konveyor/tackle2-operator/.github/actions/start-minikube@main
- name: Build image in minikube
run: |
export SHELL=/bin/bash
eval $(minikube -p minikube docker-env)
make docker-build
- name: install-tackle
uses: konveyor/tackle2-operator/.github/actions/install-tackle@main
with:
tackle-hub-image: tackle2-hub:latest
tackle-image-pull-policy: IfNotPresent

- name: save image
run: |
IMG=quay.io/konveyor/tackle2-hub:latest make docker-build
docker save -o /tmp/tackle2-hub.tar quay.io/konveyor/tackle2-hub:latest
- name: Upload image as artifact
uses: actions/upload-artifact@v3
with:
name: tackle2-hub
path: /tmp/tackle2-hub.tar
retention-days: 1
- uses: actions/checkout@v4
- run: make docker-build
- run: docker push ${IMG}

test-integration:
needs: test-e2e
needs: build-image
uses: konveyor/ci/.github/workflows/global-ci.yml@main
with:
component_name: tackle2-hub
tackle_hub: ttl.sh/konveyor-hub-${{ github.sha }}:2h
api_hub_tests_ref: ${{ github.ref }}

0 comments on commit 49ca65b

Please sign in to comment.