diff --git a/.circleci/config.yml b/.circleci/config.yml index d5152ee..818ccf5 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -9,7 +9,7 @@ jobs: steps: - checkout - run: sudo apt-get install cmake - - run: "curl -fsSL https://testspace-client.s3.amazonaws.com/testspace-linux.tgz | sudo tar -zxvf- -C /usr/local/bin" + - run: "curl -fsSL https://testspace-client.s3.amazonaws.com/testspace-linux-dev.tgz | sudo tar -zxvf- -C /usr/local/bin" - run: "testspace config url ivailo.stridespace.com" - run: "pip install gcovr" - run: "curl -fsSL https://github.com/google/googletest/archive/refs/tags/v1.14.0.tar.gz | tar -zxvf-" diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fc2cbd5..72d8d0a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,8 +1,9 @@ name: Build on: push: - schedule: - - cron: '0 1 * * 0' + pull_request: + # schedule: + # - cron: '0 1 * * 0' jobs: build: @@ -21,6 +22,8 @@ jobs: - uses: testspace-com/setup-testspace@v1 with: domain: ivailo.stridespace.com + env: + TESTSPACE_CLIENT_VER: dev - name: Install GTest run: | curl -fsSL https://github.com/google/googletest/archive/refs/tags/v1.14.0.tar.gz | tar -zxvf- diff --git a/.semaphore/semaphore.yml b/.semaphore/semaphore.yml index 8294795..fb90b0b 100644 --- a/.semaphore/semaphore.yml +++ b/.semaphore/semaphore.yml @@ -16,28 +16,28 @@ blocks: commands: &ref_0 - checkout - printenv - - curl -fsSL https://testspace-client.s3.amazonaws.com/testspace-linux.tgz | sudo tar -zxvf- -C $HOME - - $HOME/testspace config url ivailo.stridespace.com + - source ./init_testspace.sh + - printenv jobs: - name: 'Job #1' commands: - printenv - - $HOME/testspace config + - testspace config - cat $HOME/$SEMAPHORE_GIT_DIR/.testspace - - $HOME/testspace +README.md + - testspace +README.md - name: 'Job #2' commands: - printenv - - $HOME/testspace config + - testspace config - cat $HOME/$SEMAPHORE_GIT_DIR/.testspace - - $HOME/testspace +README.md + - testspace +README.md epilogue: always: commands: - printenv - - $HOME/testspace config + - testspace config - cat $HOME/$SEMAPHORE_GIT_DIR/.testspace - - $HOME/testspace +README.md + - testspace +README.md - name: 'Block #2' dependencies: [] task: @@ -47,6 +47,6 @@ blocks: - name: 'Job #1' commands: - printenv - - $HOME/testspace config + - testspace config - cat $HOME/$SEMAPHORE_GIT_DIR/.testspace - - $HOME/testspace +README.md + - testspace +README.md diff --git a/init_testspace.sh b/init_testspace.sh new file mode 100644 index 0000000..60512a6 --- /dev/null +++ b/init_testspace.sh @@ -0,0 +1,41 @@ +#!/bin/bash + +# This script installs the testspace client and configures it to use the +# 2wunder.testspace.com server. It is intended to be used in the +# commands section of a semaphore ci pipeline. +# When sourced it will install the testspace client and adds a function +# called testspace to the current shell. This function can be used independetly +# of the path of this script. + +# Usage: +# source init_testspace.sh +# +# later in the script: +# testspace [arguments] + +install_testspace_client() { + echo "Installing testspace client..." + + # Set the URL based on the current architecture + if [[ $(uname) == "Darwin" ]]; then + url="https://testspace-client.s3.amazonaws.com/testspace-darwin.tgz" + else + url="https://testspace-client.s3.amazonaws.com/testspace-linux-dev.tgz" + fi + + # Install testspace client using curl command + pushd $HOME + curl -fsSL $url | tar -zxvf- -C . + echo "Testspace client installed successfully." + popd +} + + +testspace() { + # Call testspace client with all arguments passed to the function + $HOME/testspace "$@" +} + +install_testspace_client +testspace -v +testspace config url ivailo.stridespace.com