From 0705b0eeaed5fa4ccd5688b945805290d681baed Mon Sep 17 00:00:00 2001 From: Joel Longtine Date: Mon, 21 Feb 2022 12:33:01 -0700 Subject: [PATCH] Skip non-europa tests Signed-off-by: Joel Longtine --- .github/workflows/test-docs.yml | 108 ++++++++++++++-------------- .github/workflows/test-universe.yml | 60 ---------------- docs/learn/tests/doc.bats | 93 ++++++++++++------------ 3 files changed, 102 insertions(+), 159 deletions(-) diff --git a/.github/workflows/test-docs.yml b/.github/workflows/test-docs.yml index b7c5c105..6622e770 100644 --- a/.github/workflows/test-docs.yml +++ b/.github/workflows/test-docs.yml @@ -18,66 +18,66 @@ on: - 'Makefile' - '.github/workflows/test-docs.yml' -jobs: - test-docs: - name: "Test Docs" - runs-on: ubuntu-latest - timeout-minutes: 15 - steps: - - name: "Check out" - uses: actions/checkout@v2 +# jobs: +# test-docs: +# name: "Test Docs" +# runs-on: ubuntu-latest +# timeout-minutes: 15 +# steps: +# - name: "Check out" +# uses: actions/checkout@v2 - - name: "Setup Go" - uses: actions/setup-go@v1 - with: - go-version: 1.16 +# - name: "Setup Go" +# uses: actions/setup-go@v1 +# with: +# go-version: 1.16 - - name: "Install CUE" - run: | - # Cue - export CUE_VERSION="$(grep cue ./go.mod | cut -d' ' -f2 | head -1 | sed -E 's/\.[[:digit:]]\.[[:alnum:]]+-[[:alnum:]]+$//')" - export CUE_TARBALL="cue_${CUE_VERSION}_linux_amd64.tar.gz" - echo "Installing cue version $CUE_VERSION" - curl -L https://github.com/cue-lang/cue/releases/download/${CUE_VERSION}/${CUE_TARBALL} | sudo tar zxf - -C /usr/local/bin +# - name: "Install CUE" +# run: | +# # Cue +# export CUE_VERSION="$(grep cue ./go.mod | cut -d' ' -f2 | head -1 | sed -E 's/\.[[:digit:]]\.[[:alnum:]]+-[[:alnum:]]+$//')" +# export CUE_TARBALL="cue_${CUE_VERSION}_linux_amd64.tar.gz" +# echo "Installing cue version $CUE_VERSION" +# curl -L https://github.com/cue-lang/cue/releases/download/${CUE_VERSION}/${CUE_TARBALL} | sudo tar zxf - -C /usr/local/bin - - name: "Run local registry" - run: | - docker run -d -p 5000:5000 --name registry registry:2 +# - name: "Run local registry" +# run: | +# docker run -d -p 5000:5000 --name registry registry:2 - # TODO: DISABLED for CI deadlock debugging - # - name: Generate KiND config - # run: | - # echo 'kind: Cluster - # apiVersion: kind.x-k8s.io/v1alpha4 - # containerdConfigPatches: - # - |- - # [plugins."io.containerd.grpc.v1.cri".registry.mirrors."localhost:5000"] - # endpoint = ["http://registry:5000"]' > ./kind-config.yaml - # cat ./kind-config.yaml +# # TODO: DISABLED for CI deadlock debugging +# # - name: Generate KiND config +# # run: | +# # echo 'kind: Cluster +# # apiVersion: kind.x-k8s.io/v1alpha4 +# # containerdConfigPatches: +# # - |- +# # [plugins."io.containerd.grpc.v1.cri".registry.mirrors."localhost:5000"] +# # endpoint = ["http://registry:5000"]' > ./kind-config.yaml +# # cat ./kind-config.yaml - # - name: "Setup KiND" - # uses: helm/kind-action@v1.2.0 - # with: - # config: "./kind-config.yaml" +# # - name: "Setup KiND" +# # uses: helm/kind-action@v1.2.0 +# # with: +# # config: "./kind-config.yaml" - # - name: Connect local registry to KiND - # run: | - # docker network connect kind registry +# # - name: Connect local registry to KiND +# # run: | +# # docker network connect kind registry - - 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: "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: "Expose GitHub Runtime" - uses: crazy-max/ghaction-github-runtime@v1 +# - name: "Expose GitHub Runtime" +# uses: crazy-max/ghaction-github-runtime@v1 - - name: Test - # TODO: https://github.com/dagger/dagger/pull/1341 - # env: - # DAGGER_CACHE_TO: "type=gha,mode=max,scope=test-docs" - # DAGGER_CACHE_FROM: "type=gha,mode=max,scope=test-docs" - run: | - make doc-test +# - name: Test +# # TODO: https://github.com/dagger/dagger/pull/1341 +# # env: +# # DAGGER_CACHE_TO: "type=gha,mode=max,scope=test-docs" +# # DAGGER_CACHE_FROM: "type=gha,mode=max,scope=test-docs" +# run: | +# make doc-test diff --git a/.github/workflows/test-universe.yml b/.github/workflows/test-universe.yml index 7b1cb0e3..2546d357 100644 --- a/.github/workflows/test-universe.yml +++ b/.github/workflows/test-universe.yml @@ -25,66 +25,6 @@ on: - '.github/workflows/test-universe.yml' jobs: - universe-tests: - name: "Universe Tests" - runs-on: ubuntu-latest - timeout-minutes: 30 - services: - localstack: - image: localstack/localstack:0.12.16 - env: - SERVICES: s3, ecr - LOCALSTACK_API_KEY: ${{ secrets.LOCALSTACK_API_KEY }} - ports: - - 4566:4566 - - 4571:4571 - - 4510:4510 - options: >- - --health-cmd "curl -f http://localhost:4566/health" - --health-start-period 5s - --health-timeout 5s - --health-interval 5s - --health-retries 10 - - steps: - - name: "Check out" - uses: actions/checkout@v2 - - - name: "Setup Go" - uses: actions/setup-go@v1 - with: - go-version: 1.16 - - - name: "Setup KiND" - 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: "Provision Localstack AWS resources" - env: - AWS_ACCESS_KEY_ID: test - AWS_SECRET_ACCESS_KEY: test - AWS_DEFAULT_REGION: us-east-2 - run: | - aws --endpoint-url=http://localhost:4566 s3 mb s3://dagger-ci - aws --endpoint-url=http://localhost:4566 ecr create-repository --repository-name dagger-ci - - - name: "Expose GitHub Runtime" - uses: crazy-max/ghaction-github-runtime@v1 - - - name: Test - # TODO: https://github.com/dagger/dagger/pull/1341 - # env: - # DAGGER_CACHE_TO: "type=gha,mode=max,scope=test-universe" - # DAGGER_CACHE_FROM: "type=gha,mode=max,scope=test-universe" - run: | - make universe-test - universe-europa-tests: name: "Universe Tests - Europa" runs-on: ubuntu-latest diff --git a/docs/learn/tests/doc.bats b/docs/learn/tests/doc.bats index 5db8ee15..c08595c4 100644 --- a/docs/learn/tests/doc.bats +++ b/docs/learn/tests/doc.bats @@ -9,73 +9,76 @@ setup() { # Test 1003-get-started @test "doc-1003-get-started" { - setup_example_sandbox + skip "TODO: Implement for Europa" + # setup_example_sandbox - # Follow tutorial - mkdir -p "$DAGGER_SANDBOX"/plans/local - cp "$DAGGER_PROJECT"/getting-started/plans/todoapp.cue "$DAGGER_SANDBOX"/plans/todoapp.cue - cp "$DAGGER_PROJECT"/getting-started/plans/local/local.cue "$DAGGER_SANDBOX"/plans/local/local.cue + # # Follow tutorial + # mkdir -p "$DAGGER_SANDBOX"/plans/local + # cp "$DAGGER_PROJECT"/getting-started/plans/todoapp.cue "$DAGGER_SANDBOX"/plans/todoapp.cue + # cp "$DAGGER_PROJECT"/getting-started/plans/local/local.cue "$DAGGER_SANDBOX"/plans/local/local.cue - dagger --project "$DAGGER_SANDBOX" new 'local' -p "$DAGGER_SANDBOX"/plans/local - dagger --project "$DAGGER_SANDBOX" -e 'local' input socket dockerSocket /var/run/docker.sock - dagger --project "$DAGGER_SANDBOX" -e 'local' input dir app.source "$DAGGER_SANDBOX" + # dagger --project "$DAGGER_SANDBOX" new 'local' -p "$DAGGER_SANDBOX"/plans/local + # dagger --project "$DAGGER_SANDBOX" -e 'local' input socket dockerSocket /var/run/docker.sock + # dagger --project "$DAGGER_SANDBOX" -e 'local' input dir app.source "$DAGGER_SANDBOX" - run dagger --project "$DAGGER_SANDBOX" -e 'local' up - assert_success + # run dagger --project "$DAGGER_SANDBOX" -e 'local' up + # assert_success - docker rm -f todoapp - docker rm -f registry-local + # docker rm -f todoapp + # docker rm -f registry-local } @test "doc-1004-first-env" { - setup_example_sandbox + skip "TODO: Implement for Europa" + # setup_example_sandbox - # Follow tutorial - mkdir -p "$DAGGER_SANDBOX"/multibucket - cp "$DAGGER_PROJECT"/multibucket/source.cue "$DAGGER_SANDBOX"/multibucket - cp "$DAGGER_PROJECT"/multibucket/yarn.cue "$DAGGER_SANDBOX"/multibucket - cp "$DAGGER_PROJECT"/multibucket/netlify.cue "$DAGGER_SANDBOX"/multibucket + # # Follow tutorial + # mkdir -p "$DAGGER_SANDBOX"/multibucket + # cp "$DAGGER_PROJECT"/multibucket/source.cue "$DAGGER_SANDBOX"/multibucket + # cp "$DAGGER_PROJECT"/multibucket/yarn.cue "$DAGGER_SANDBOX"/multibucket + # cp "$DAGGER_PROJECT"/multibucket/netlify.cue "$DAGGER_SANDBOX"/multibucket - dagger --project "$DAGGER_SANDBOX" doc alpha.dagger.io/netlify - dagger --project "$DAGGER_SANDBOX" doc alpha.dagger.io/js/yarn + # dagger --project "$DAGGER_SANDBOX" doc alpha.dagger.io/netlify + # dagger --project "$DAGGER_SANDBOX" doc alpha.dagger.io/js/yarn - # Initialize new env - dagger --project "$DAGGER_SANDBOX" new 'multibucket' -p "$DAGGER_SANDBOX"/multibucket + # # Initialize new env + # dagger --project "$DAGGER_SANDBOX" new 'multibucket' -p "$DAGGER_SANDBOX"/multibucket - # Copy corresponding env - cp -r "$DAGGER_PROJECT"/.dagger/env/multibucket "$DAGGER_SANDBOX"/.dagger/env/ + # # Copy corresponding env + # cp -r "$DAGGER_PROJECT"/.dagger/env/multibucket "$DAGGER_SANDBOX"/.dagger/env/ - # Add missing src input - dagger --project "$DAGGER_SANDBOX" -e multibucket input dir src "$DAGGER_SANDBOX" + # # Add missing src input + # dagger --project "$DAGGER_SANDBOX" -e multibucket input dir src "$DAGGER_SANDBOX" - # Run test - dagger --project "$DAGGER_SANDBOX" -e multibucket up - url=$(dagger --project "$DAGGER_SANDBOX" -e multibucket query -f text site.netlify.deployUrl) + # # Run test + # dagger --project "$DAGGER_SANDBOX" -e multibucket up + # url=$(dagger --project "$DAGGER_SANDBOX" -e multibucket query -f text site.netlify.deployUrl) - # Check output - run curl "$url" - assert_output --partial "./static/css/main.9149988f.chunk.css" + # # Check output + # run curl "$url" + # assert_output --partial "./static/css/main.9149988f.chunk.css" } @test "doc-1006-google-cloud-run" { - setup_example_sandbox + skip "TODO: Implement for Europa" + # setup_example_sandbox - # Follow tutorial - mkdir -p "$DAGGER_SANDBOX"/gcpcloudrun - cp "$DAGGER_PROJECT"/gcpcloudrun/source.cue "$DAGGER_SANDBOX"/gcpcloudrun + # # Follow tutorial + # mkdir -p "$DAGGER_SANDBOX"/gcpcloudrun + # cp "$DAGGER_PROJECT"/gcpcloudrun/source.cue "$DAGGER_SANDBOX"/gcpcloudrun - # Initialize new env - dagger --project "$DAGGER_SANDBOX" new 'gcpcloudrun' -p "$DAGGER_SANDBOX"/gcpcloudrun + # # Initialize new env + # dagger --project "$DAGGER_SANDBOX" new 'gcpcloudrun' -p "$DAGGER_SANDBOX"/gcpcloudrun - # Copy corresponding env - cp -r "$DAGGER_PROJECT"/.dagger/env/gcpcloudrun "$DAGGER_SANDBOX"/.dagger/env/ + # # Copy corresponding env + # cp -r "$DAGGER_PROJECT"/.dagger/env/gcpcloudrun "$DAGGER_SANDBOX"/.dagger/env/ - # Add missing src input - dagger --project "$DAGGER_SANDBOX" -e gcpcloudrun input dir src "$DAGGER_SANDBOX" + # # Add missing src input + # dagger --project "$DAGGER_SANDBOX" -e gcpcloudrun input dir src "$DAGGER_SANDBOX" - # Run test - run dagger --project "$DAGGER_SANDBOX" -e gcpcloudrun up - assert_success + # # Run test + # run dagger --project "$DAGGER_SANDBOX" -e gcpcloudrun up + # assert_success } @test "doc-1007-kube-kind" {