Skip to content

Bumped to weaver v0.18.0. #42

Bumped to weaver v0.18.0.

Bumped to weaver v0.18.0. #42

Workflow file for this run

# Copyright 2023 Google LLC
#
# 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:
- 'main'
pull_request:
jobs:
collatz:
name: Build collatz binary
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
name: Checkout collatz example
with:
repository: ServiceWeaver/weaver
ref: 'v0.15.0'
- uses: actions/setup-go@v4
with:
go-version: '1.20'
cache: true
- name: Build collatz example
working-directory: ./examples/collatz
run: |
# Disable CGO to ensure the binary is statically linked
CGO_ENABLED=0 \
go build -o collatz
- uses: actions/upload-artifact@v3
with:
name: collatz-binary
path: ./examples/collatz/collatz
deploy:
name: Deploy and run tests
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
needs: collatz
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: '1.20'
cache: true
- uses: azure/setup-kubectl@v3
- uses: medyagh/setup-minikube@master
- uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Install weaver-kube
run: |
go install ./cmd/weaver-kube
- uses: actions/download-artifact@v3
with:
name: collatz-binary
path: ./examples/collatz
- name: Run integration script
working-directory: ./examples/collatz
run: ../../dev/integration.sh
shell: bash
env:
IMAGE_NAME: ghcr.io/${{ github.repository }}/example-collatz
- name: Display deployment logs
if: failure()
working-directory: ./examples/collatz
run: |
kubectl get all && \
kubectl describe pod -l app_name=collatz && \
kubectl logs -l app_name=collatz
- uses: actions/upload-artifact@v3
if: always()
with:
name: collatz-kube-manifests
path: ./examples/collatz/kube_*.yaml