From 478192f38d14529735638a41d6b82719a7110145 Mon Sep 17 00:00:00 2001 From: Marlon Saglia Date: Thu, 15 Aug 2024 13:11:00 +0200 Subject: [PATCH] Migrate workflow "test-system-test" to Github Actions remove joibs --- .github/workflows/test.yml | 42 ++++++++++++++++++++++++++ screwdriver.yaml | 61 -------------------------------------- 2 files changed, 42 insertions(+), 61 deletions(-) create mode 100644 .github/workflows/test.yml delete mode 100644 screwdriver.yaml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 000000000..4df9111e4 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,42 @@ +name: Test + +on: + push: + branches: + - master + + pull_request: + branches: + - master + +defaults: + run: + # Specify to ensure "pipefail and errexit" are set. + # Ref: https://docs.github.com/en/actions/writing-workflows/workflow-syntax-for-github-actions#defaultsrunshell + shell: bash + +jobs: + test: + runs-on: ubuntu-latest + container: + image: docker.io/vespaengine/vespa-build-almalinux-8:latest + + env: + RUBYLIB: ${{ github.workspace }}/lib + + steps: + - uses: actions/checkout@v4 + + - name: require-test-files + run: | + export VESPA_FACTORY_NO_AUTORUNNER=1 + for FILE in $(find tests -name "*.rb"); do + ruby -I lib -I tests -I . -e "require '$FILE'" + done + + - name: run-unit-tests + run: | + set -e + cd ${RUBYLIB} + ruby test/testrunner.rb + exit $? diff --git a/screwdriver.yaml b/screwdriver.yaml deleted file mode 100644 index f4854213b..000000000 --- a/screwdriver.yaml +++ /dev/null @@ -1,61 +0,0 @@ -# Copyright Vespa.ai. All rights reserved. -shared: - image: docker.io/vespaengine/vespa-build-almalinux-8:latest - annotations: - screwdriver.cd/restrictPR: fork - settings: - email: - addresses: [kraune@yahooinc.com] - statuses: [SUCCESS, FAILURE] - environment: - USER_SHELL_BIN: bash - -jobs: - test-system-tests: - requires: [~pr, ~commit] - environment: - USER_SHELL_BIN: bash - RUBYLIB: $SD_SOURCE_DIR/lib - steps: - - require-test-files: | - export VESPA_FACTORY_NO_AUTORUNNER=1 - for FILE in $(find tests -name "*.rb"); do - ruby -I lib -I tests -I . -e "require '$FILE'" - done - - run-unit-tests: | - set -e - cd ${RUBYLIB} - ruby test/testrunner.rb - exit $? - - systemtest-base-el8: - requires: [~pr, ~commit] - sourcePaths: ["docker/"] - annotations: - screwdriver.cd/cpu: HIGH - screwdriver.cd/ram: HIGH - screwdriver.cd/timeout: 30 - screwdriver.cd/buildPeriodically: H 4 * * 1 - screwdriver.cd/dockerEnabled: true - screwdriver.cd/dockerCpu: TURBO - screwdriver.cd/dockerRam: TURBO - secrets: - - DOCKER_HUB_DEPLOY_KEY - steps: - - install-docker-cli: | - dnf config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo - dnf -y install docker-ce docker-ce-cli containerd.io - docker system info - - build: | - cd docker - docker build --file Dockerfile.base \ - --build-arg BASE_IMAGE=docker.io/almalinux:8 \ - --tag docker.io/vespaengine/vespa-systemtest-base-el8:latest . - - publish: | - if [[ -z "$SD_PULL_REQUEST" ]]; then - OPT_STATE="$(set +o)" - set +x - docker login --username aressem --password "$DOCKER_HUB_DEPLOY_KEY" - eval "$OPT_STATE" - docker push docker.io/vespaengine/vespa-systemtest-base-el8:latest - fi