#151: Changed iteration of nightly job (#152) #506
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: push | |
jobs: | |
prep-testbed: | |
runs-on: ubuntu-20.04 | |
name: Prepare test bed | |
steps: | |
- uses: actions/checkout@v2 | |
- id: set-matrix | |
run: | | |
sudo apt-get install jq | |
sudo bash ./tests/scripts/cran/install_cran_repos.sh | |
echo "Result:" | |
echo $(sudo bash ./tests/scripts/cran/get_R_releases.sh) | |
echo "::set-output name=matrix::$(sudo bash ./tests/scripts/cran/get_R_releases.sh)" | |
outputs: | |
matrix: ${{ steps.set-matrix.outputs.matrix }} | |
integration_tests: | |
needs: prep-testbed | |
environment: publish | |
name: Run integration tests for R=${{ matrix.r-version }}, with memory checker=${{ matrix.memory_checker }} | |
strategy: | |
fail-fast: false | |
matrix: | |
memory_checker: | |
- no_check | |
- valgrind | |
- asan_no_leak | |
r-version: ${{fromJson(needs.prep-testbed.outputs.matrix)}} | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Checkout test environment | |
run: git clone --branch 1.1.0 --depth 1 https://github.com/exasol/integration-test-docker-environment.git | |
working-directory: .. | |
- name: Spawn EXASOL environemnt | |
run: ./start-test-env spawn-test-environment --environment-name test --database-port-forward 8888 --bucketfs-port-forward 6666 --db-mem-size 4GB | |
working-directory: ../integration-test-docker-environment | |
- name: Docker login | |
run: echo "$SECRET_DOCKER_TOKEN" | docker login --username "$SECRET_DOCKER_USER_NAME" --password-stdin | |
env: # Set the secret as an input | |
SECRET_DOCKER_USER_NAME: ${{ secrets.DOCKER_USER_NAME }} | |
SECRET_DOCKER_TOKEN: ${{ secrets.DOCKER_TOKEN }} | |
- name: Run all tests | |
run: | | |
./tests/scripts/pull_docker_image.sh ${{ matrix.r-version }} | |
./tests/scripts/execute_docker_test_env.sh ${{ matrix.r-version }} ${{ matrix.memory_checker }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
publish-main: | |
needs: [prep-testbed,integration_tests] | |
if: github.ref == 'refs/heads/main' | |
name: Publish to docker hub for R=${{ matrix.r-version }} | |
strategy: | |
fail-fast: false | |
matrix: | |
r-version: ${{fromJson(needs.prep-testbed.outputs.matrix)}} | |
runs-on: ubuntu-20.04 | |
environment: publish | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Build new Docker image | |
run: "bash tests/scripts/build_docker_test_env.sh ${{ matrix.r-version }}" | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Docker login | |
run: echo "$SECRET_DOCKER_TOKEN" | docker login --username "$SECRET_DOCKER_USER_NAME" --password-stdin | |
env: # Set the secret as an input | |
SECRET_DOCKER_USER_NAME: ${{ secrets.DOCKER_USER_NAME }} | |
SECRET_DOCKER_TOKEN: ${{ secrets.DOCKER_TOKEN }} | |
- name: Push new Docker images | |
run: "bash tests/scripts/push_docker_image.sh ${{ matrix.r-version }}" | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |