|
| 1 | +name: Release Droid - Prepare Original Checksum |
| 2 | + |
| 3 | +on: |
| 4 | + workflow_dispatch: |
| 5 | + |
| 6 | +jobs: |
| 7 | + prep-testbed: |
| 8 | + runs-on: ubuntu-18.04 |
| 9 | + steps: |
| 10 | + - uses: actions/checkout@v2 |
| 11 | + - id: set-matrix |
| 12 | + run: | |
| 13 | + sudo apt-get install jq |
| 14 | + sudo bash ./tests/scripts/cran/install_cran_repos.sh |
| 15 | + echo "Result:" |
| 16 | + echo $(sudo bash ./tests/scripts/cran/get_R_releases.sh) |
| 17 | + echo "::set-output name=matrix::$(sudo bash ./tests/scripts/cran/get_R_releases.sh)" |
| 18 | + outputs: |
| 19 | + matrix: ${{ steps.set-matrix.outputs.matrix }} |
| 20 | + |
| 21 | + integration_tests: |
| 22 | + needs: prep-testbed |
| 23 | + environment: publish |
| 24 | + strategy: |
| 25 | + fail-fast: false |
| 26 | + matrix: |
| 27 | + r-version: ${{fromJson(needs.prep-testbed.outputs.matrix)}} |
| 28 | + runs-on: ubuntu-18.04 |
| 29 | + |
| 30 | + steps: |
| 31 | + - uses: actions/checkout@v2 |
| 32 | + - name: Checkout test environment |
| 33 | + run: git clone https://github.com/exasol/integration-test-docker-environment.git |
| 34 | + working-directory: .. |
| 35 | + - name: Spawn EXASOL environemnt |
| 36 | + run: ./start-test-env spawn-test-environment --environment-name test --database-port-forward 8888 --bucketfs-port-forward 6666 --db-mem-size 4GB |
| 37 | + working-directory: ../integration-test-docker-environment |
| 38 | + - name: Docker login |
| 39 | + run: echo "$SECRET_DOCKER_TOKEN" | docker login --username "$SECRET_DOCKER_USER_NAME" --password-stdin |
| 40 | + env: # Set the secret as an input |
| 41 | + SECRET_DOCKER_USER_NAME: ${{ secrets.DOCKER_USER_NAME }} |
| 42 | + SECRET_DOCKER_TOKEN: ${{ secrets.DOCKER_TOKEN }} |
| 43 | + - name: Run all tests |
| 44 | + run: | |
| 45 | + ./tests/scripts/pull_docker_image.sh ${{ matrix.r-version }} |
| 46 | + ./tests/scripts/execute_docker_test_env.sh ${{ matrix.r-version }} |
| 47 | +
|
| 48 | + publish-main: |
| 49 | + needs: [prep-testbed,integration_tests] |
| 50 | + if: github.ref == 'refs/heads/main' |
| 51 | + strategy: |
| 52 | + fail-fast: false |
| 53 | + matrix: |
| 54 | + r-version: ${{fromJson(needs.prep-testbed.outputs.matrix)}} |
| 55 | + runs-on: ubuntu-18.04 |
| 56 | + |
| 57 | + environment: publish |
| 58 | + steps: |
| 59 | + - uses: actions/checkout@v2 |
| 60 | + - name: Build new Docker image |
| 61 | + run: "bash tests/scripts/build_docker_test_env.sh ${{ matrix.r-version }}" |
| 62 | + - name: Docker login |
| 63 | + run: echo "$SECRET_DOCKER_TOKEN" | docker login --username "$SECRET_DOCKER_USER_NAME" --password-stdin |
| 64 | + env: # Set the secret as an input |
| 65 | + SECRET_DOCKER_USER_NAME: ${{ secrets.DOCKER_USER_NAME }} |
| 66 | + SECRET_DOCKER_TOKEN: ${{ secrets.DOCKER_TOKEN }} |
| 67 | + - name: Push new Docker images |
| 68 | + run: "bash tests/scripts/push_docker_image.sh ${{ matrix.r-version }}" |
| 69 | + |
0 commit comments