From cc004eb0efd7d4f2e270ad333cbaad81ef732db0 Mon Sep 17 00:00:00 2001 From: Andrea Luzzardi Date: Thu, 1 Jul 2021 18:47:32 +0200 Subject: [PATCH] ci: run universe tests as a separate CI job Signed-off-by: Andrea Luzzardi --- .github/workflows/ci.yml | 42 +++++++++++++++++++++++++--------------- Makefile | 9 ++++----- 2 files changed, 30 insertions(+), 21 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1658b159..e7737f2d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -76,9 +76,6 @@ jobs: with: go-version: 1.16 - - name: Setup Kind Kubernetes Cluster - uses: helm/kind-action@v1.2.0 - - name: Install Dependencies run: | # SOPS @@ -92,20 +89,33 @@ jobs: mkdir -p ~/.config/dagger echo "$DAGGER_AGE_KEY" > ~/.config/dagger/keys.txt - - name: Login to Docker Hub - uses: docker/login-action@v1 - with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} - - name: Integration test run: | - make integration + make core-integration - - name: Publish Test Report - uses: mikepenz/action-junit-report@v2 - if: always() + universe: + name: Universe + runs-on: ubuntu-latest + timeout-minutes: 30 + steps: + - name: Check out + uses: actions/checkout@v2 + + - name: Set up Go + uses: actions/setup-go@v1 with: - report_paths: "tests/*.xml" - github_token: ${{ secrets.GITHUB_TOKEN }} - check_name: "Report" + go-version: 1.16 + + - name: Setup Kind Kubernetes Cluster + uses: helm/kind-action@v1.2.0 + + - name: Import Dagger private key + env: + DAGGER_AGE_KEY: ${{ secrets.DAGGER_AGE_KEY }} + run: | + mkdir -p ~/.config/dagger + echo "$DAGGER_AGE_KEY" > ~/.config/dagger/keys.txt + + - name: Universe Test + run: | + make universe-test diff --git a/Makefile b/Makefile index 4d8b86c7..00c5e1e8 100644 --- a/Makefile +++ b/Makefile @@ -41,16 +41,15 @@ check-buildkit-version: || { echo buildkit version mismatch go.mod != util/buildkitd/buildkitd.go ; exit 1; } .PHONY: integration -integration: dagger-debug universe-test - $(shell command -v sops > /dev/null || { echo "You need sops. On macOS: brew install sops"; exit 1; }) - $(shell command -v parallel > /dev/null || { echo "You need gnu parallel. On macOS: brew install parallel"; exit 1; }) +integration: core-integration universe-test + +.PHONY: core-integration +core-integration: dagger-debug yarn --cwd "./tests" install DAGGER_BINARY="../cmd/dagger/dagger-debug" yarn --cwd "./tests" test .PHONY: universe-test universe-test: dagger-debug - $(shell command -v sops > /dev/null || { echo "You need sops. On macOS: brew install sops"; exit 1; }) - $(shell command -v parallel > /dev/null || { echo "You need gnu parallel. On macOS: brew install parallel"; exit 1; }) yarn --cwd "./universe" install DAGGER_BINARY="../cmd/dagger/dagger-debug" yarn --cwd "./universe" test