fix: fix labsdk bugs (#320) #204
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
name: Integration Tests | |
# Trigger the workflow on pull requests and direct pushes to any branch | |
on: | |
push: | |
paths-ignore: | |
- '.github/**' | |
- 'hack/**' | |
- 'labsdk/**' | |
- '**.md' | |
- 'Tiltfile' | |
- '.tiltignore' | |
- '.golangci.yml' | |
- '.pre-commit-config.yaml' | |
- '.gitingore' | |
pull_request: | |
types: [ opened, synchronize ] | |
paths-ignore: | |
- '.github/**' | |
- 'hack/**' | |
- 'labsdk/**' | |
- '!labsdk/raptor/program.py' | |
- '**.md' | |
- 'Tiltfile' | |
- '.tiltignore' | |
- '.golangci.yml' | |
- '.pre-commit-config.yaml' | |
- '.gitingore' | |
jobs: | |
test-e2e: | |
name: test-e2e | |
runs-on: ubuntu-latest | |
# Pull requests from the same repository won't trigger this checks as they were already triggered by the push | |
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository | |
steps: | |
- name: Setup Go environment | |
uses: actions/setup-go@v5 | |
with: | |
go-version: '^1.21' | |
- name: Clone the code | |
uses: actions/checkout@v4 | |
- name: Cache go dependencies | |
uses: actions/cache@v4 | |
with: | |
path: | | |
~/.cache/go-build | |
~/go/pkg/mod | |
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | |
restore-keys: | | |
${{ runner.os }}-go- | |
- name: Install KiND | |
uses: helm/kind-action@v1.8.0 | |
with: | |
install_only: true | |
- name: Install Kustomize | |
uses: imranismail/setup-kustomize@v2 | |
- name: Set up gotestfmt | |
uses: GoTestTools/gotestfmt-action@v2 | |
with: | |
# Optional: pass GITHUB_TOKEN to avoid rate limiting. | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build the containers | |
run: make docker-build | |
shell: bash | |
- name: Run Integration tests | |
shell: bash | |
run: | | |
set -euo pipefail | |
go test -v -timeout 1h -json -tags e2e github.com/raptor-ml/raptor/internal/e2e --args -v 5 -build-tag=$(git rev-parse --short HEAD) 2>&1 | tee /tmp/gotest.log | gotestfmt | |
- name: Upload test log | |
uses: actions/upload-artifact@v4 | |
if: always() | |
with: | |
name: test-log | |
path: /tmp/gotest.log | |
if-no-files-found: error | |
- name: Report failure | |
if: failure() && github.event_name == 'push' && github.ref == 'refs/heads/master' | |
uses: actions-cool/issues-helper@v3 | |
with: | |
actions: 'create-issue' | |
token: ${{ secrets.GITHUB_TOKEN }} | |
title: 🐛 E2E failed for ${{ github.sha }} | |
body: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }} | |
labels: bug |