Skip to content

Commit

Permalink
feat: add e2e to rust client
Browse files Browse the repository at this point in the history
Signed-off-by: Gaius <gaius.qi@gmail.com>
  • Loading branch information
gaius-qi committed Apr 18, 2024
1 parent 4abb179 commit 45925ce
Show file tree
Hide file tree
Showing 8 changed files with 98 additions and 98 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/check-size.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
push:
branches: [main, release-*]
pull_request:
branches: [main, release-*]
branches: [amain, release-*]

env:
GO_VERSION: '1.21'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
branches: [main, release-*]
paths-ignore: ['**.md', '**.png', '**.jpg', '**.svg', '**/docs/**']
pull_request:
branches: [ main, release-* ]
branches: [amain, release-*]
paths-ignore: ['**.md', '**.png', '**.jpg', '**.svg', '**/docs/**']
schedule:
- cron: '0 4 * * *'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
branches: [main, release-*]
paths-ignore: ['**.md', '**.png', '**.jpg', '**.svg', '**/docs/**']
pull_request:
branches: [main, release-*]
branches: [amain, release-*]
paths-ignore: ['**.md', '**.png', '**.jpg', '**.svg', '**/docs/**']
schedule:
- cron: '0 4 * * *'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/compatibility-e2e-with-client-go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
branches: [main, release-*]
paths-ignore: ["**.md", "**.png", "**.jpg", "**.svg", "**/docs/**"]
pull_request:
branches: [main, release-*]
branches: [amain, release-*]
paths-ignore: ["**.md", "**.png", "**.jpg", "**.svg", "**/docs/**"]
schedule:
- cron: '0 4 * * *'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/e2e-with-client-go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
branches: [main, release-*]
paths-ignore: ["**.md", "**.png", "**.jpg", "**.svg", "**/docs/**"]
pull_request:
branches: [main, release-*]
branches: [amain, release-*]
paths-ignore: ["**.md", "**.png", "**.jpg", "**.svg", "**/docs/**"]
schedule:
- cron: '0 4 * * *'
Expand Down
182 changes: 91 additions & 91 deletions .github/workflows/e2e-with-client-rs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,90 +30,90 @@ jobs:
charts-config: test/testdata/charts/config-rs.yaml
skip: ""
steps:
- name: Free Disk Space (Ubuntu)
uses: jlumbroso/free-disk-space@main
with:
tool-cache: false
android: true
dotnet: true
haskell: true
large-packages: true
docker-images: true
swap-storage: true
# - name: Free Disk Space (Ubuntu)
# uses: jlumbroso/free-disk-space@main
# with:
# tool-cache: false
# android: true
# dotnet: true
# haskell: true
# large-packages: true
# docker-images: true
# swap-storage: true

- name: Checkout code
uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0

- name: Install Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod

- name: Get dependencies
run: |
go install github.com/onsi/ginkgo/v2/ginkgo@v2.12.0
mkdir -p /tmp/artifact
- name: Setup buildx
uses: docker/setup-buildx-action@v3
id: buildx
with:
install: true
# - name: Install Go
# uses: actions/setup-go@v5
# with:
# go-version-file: go.mod

- name: Cache Docker layers
uses: actions/cache@v4
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-
# - name: Get dependencies
# run: |
# go install github.com/onsi/ginkgo/v2/ginkgo@v2.12.0
# mkdir -p /tmp/artifact

# - name: Setup buildx
# uses: docker/setup-buildx-action@v3
# id: buildx
# with:
# install: true

# - name: Cache Docker layers
# uses: actions/cache@v4
# with:
# path: /tmp/.buildx-cache
# key: ${{ runner.os }}-buildx-${{ github.sha }}
# restore-keys: |
# ${{ runner.os }}-buildx-

- name: Pull Rust Client Image
run: |
cd client-rs
# TODO Use the latest tag.
# CLIENT_TAG=$(git describe --tags $(git rev-list --tags --max-count=1))
CLIENT_TAG=latest
docker pull dragonflyoss/client:$CLIENT_TAG
docker tag dragonflyoss/client:$CLIENT_TAG dragonflyoss/client:latest
- name: Build Scheduler Image
uses: docker/build-push-action@v5
with:
context: .
file: build/images/scheduler/Dockerfile
push: false
load: true
tags: dragonflyoss/scheduler:latest
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new

- name: Build Manager Image
uses: docker/build-push-action@v5
with:
context: .
file: build/images/manager/Dockerfile
push: false
load: true
tags: dragonflyoss/manager:latest
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new

- name: Setup Kind
uses: helm/kind-action@v1.9.0
with:
version: ${{ env.KIND_VERSION }}
config: ${{ env.KIND_CONFIG_PATH }}
cluster_name: kind

- name: Kind load images
run: |
kind load docker-image dragonflyoss/manager:latest
kind load docker-image dragonflyoss/scheduler:latest
kind load docker-image dragonflyoss/client:latest
CLIENT_TAG=$(git describe --tags $(git rev-parse HEAD))
echo $CLIENT_TAG
# CLIENT_TAG=latest
# docker pull dragonflyoss/client:$CLIENT_TAG
# docker tag dragonflyoss/client:$CLIENT_TAG dragonflyoss/client:latest
# - name: Build Scheduler Image
# uses: docker/build-push-action@v5
# with:
# context: .
# file: build/images/scheduler/Dockerfile
# push: false
# load: true
# tags: dragonflyoss/scheduler:latest
# cache-from: type=local,src=/tmp/.buildx-cache
# cache-to: type=local,dest=/tmp/.buildx-cache-new

# - name: Build Manager Image
# uses: docker/build-push-action@v5
# with:
# context: .
# file: build/images/manager/Dockerfile
# push: false
# load: true
# tags: dragonflyoss/manager:latest
# cache-from: type=local,src=/tmp/.buildx-cache
# cache-to: type=local,dest=/tmp/.buildx-cache-new

# - name: Setup Kind
# uses: helm/kind-action@v1.9.0
# with:
# version: ${{ env.KIND_VERSION }}
# config: ${{ env.KIND_CONFIG_PATH }}
# cluster_name: kind

# - name: Kind load images
# run: |
# kind load docker-image dragonflyoss/manager:latest
# kind load docker-image dragonflyoss/scheduler:latest
# kind load docker-image dragonflyoss/client:latest

# TODO Setup dragonfly
# - name: Setup dragonfly
Expand All @@ -129,22 +129,22 @@ jobs:
# --feature-gates=dfget-range=true,dfget-open-range=true,dfget-empty-file=true,dfget-recursive=true
# cat coverprofile.out >> coverage.txt

- name: Move cache
run: |
rm -rf /tmp/.buildx-cache
mv /tmp/.buildx-cache-new /tmp/.buildx-cache
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage.txt
flags: e2etests

- name: Upload Logs
uses: actions/upload-artifact@v4
if: always()
with:
name: ${{ matrix.module }}-e2e-tests-logs
path: |
/tmp/artifact/**/*.log
# - name: Move cache
# run: |
# rm -rf /tmp/.buildx-cache
# mv /tmp/.buildx-cache-new /tmp/.buildx-cache

# - name: Upload coverage to Codecov
# uses: codecov/codecov-action@v4
# with:
# token: ${{ secrets.CODECOV_TOKEN }}
# files: ./coverage.txt
# flags: e2etests

# - name: Upload Logs
# uses: actions/upload-artifact@v4
# if: always()
# with:
# name: ${{ matrix.module }}-e2e-tests-logs
# path: |
# /tmp/artifact/**/*.log
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
push:
branches: [main, release-*]
pull_request:
branches: [main, release-*]
branches: [amain, release-*]

env:
GO_VERSION: '1.21'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/nydus-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
branches: [main, release-*]
paths-ignore: ["**.md", "**.png", "**.jpg", "**.svg", "**/docs/**"]
pull_request:
branches: [main, release-*]
branches: [amain, release-*]
paths-ignore: ["**.md", "**.png", "**.jpg", "**.svg", "**/docs/**"]
schedule:
- cron: '0 4 * * *'
Expand Down

0 comments on commit 45925ce

Please sign in to comment.