From 2373116f8e1da3db1011b6c94a4cb394d05ec4fb Mon Sep 17 00:00:00 2001 From: Marlon Saglia Date: Thu, 15 Aug 2024 12:55:10 +0200 Subject: [PATCH] Migrate workflow "test-system-test" to Github Actions --- .github/workflows/test.yml | 47 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 000000000..c15ae3585 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,47 @@ +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: Set up Ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: 3.1 + + - 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 $?