Skip to content

Nightly Testing

Nightly Testing #487

Workflow file for this run

name: Nightly Testing
on:
schedule:
# Nightly at 9:18 am GMT, or 2:18 am Pacific Time, from Monday to Friday
- cron: '18 9 * * 1-5'
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout the project
uses: actions/checkout@v2
- name: Build the project
run: cd connector && sbt package
- name: Upload the build artifact
uses: actions/upload-artifact@v3
with:
name: build-jar-file
path: /home/runner/work/spark-connector/spark-connector/connector/target/scala-2.12/spark-vertica-connector_2.12-*.jar
run-spark-integration-tests:
name: Run regression tests against different versions of Vertica
runs-on: ubuntu-latest
needs: build
strategy:
fail-fast: false
matrix:
runtime: [ { spark: "[3.0.0, 3.1.0)", hadoop: "2.7.4" },
{ spark: "[3.1.0, 3.2.0)", hadoop: "3.2.0" },
{ spark: "[3.2.0, 3.3.0)", hadoop: "3.3.1" },
{ spark: "[3.3.0, 3.4.0)", hadoop: "3.3.2" } ]
vertica: ["11.1.1-2", "12.0.4-0" ]
steps:
- name: Checkout the project
uses: actions/checkout@v2
- name: Remove existing docker containers
run: cd docker && docker-compose down
- name: Run docker compose
run: cd docker && docker-compose up -d
env:
SPARK_VERSION: ${{matrix.runtime.spark}}
HADOOP_VERSION: ${{matrix.runtime.hadoop}}
VERTICA_VERSION: ${{matrix.vertica}}
- name: Download the build artifact
uses: actions/download-artifact@v2
with:
name: build-jar-file
path: ./functional-tests/lib/
- name: Wait for Vertica to be available
uses: nick-invision/retry@v2
with:
timeout_seconds: 20
max_attempts: 10
retry_on: error
command: docker logs docker_vertica_1 | grep "Vertica container is now running" >/dev/null
- name: Run the integration tests
run: docker exec -w /spark-connector/functional-tests docker_client_1 sbt run
- name: Remove docker containers
run: cd docker && docker-compose down
run-integration-tests-on-standalone-cluster:
runs-on: ubuntu-latest
needs: build
steps:
- name: Checkout the project
uses: actions/checkout@v2
- name: Download the build artifact
uses: actions/download-artifact@v2
with:
name: build-jar-file
path: ./functional-tests/lib/
- name: Build the functional-tests project
run: cd functional-tests && sbt assembly
- name: Build client image
run: docker build -t client ./docker/client
- name: Run docker compose
run: cd docker && docker-compose up -d
- name: Wait for Vertica to be available
uses: nick-invision/retry@v2
with:
timeout_seconds: 20
max_attempts: 10
retry_on: error
command: docker logs docker_vertica_1 | grep "Vertica container is now running" >/dev/null
- name: Run the integration tests against a standalone cluster
run: docker exec -w /spark-connector/functional-tests docker_client_1 bash -c "./submit-functional-tests.sh"
- name: Remove docker containers
run: cd docker && docker-compose down
slack-workflow-status:
name: Post Workflow Status To Slack
runs-on: ubuntu-latest
needs: [build,
run-spark-integration-tests,
run-integration-tests-on-standalone-cluster]
if: failure()
steps:
- name: Slack Workflow Notification
uses: Gamesight/slack-workflow-status@master
if: always()
with:
repo_token: ${{secrets.GITHUB_TOKEN}}
slack_webhook_url: ${{secrets.SLACK_CHANNEL_WEBHOOK}}
name: 'Nightly tests failed'
icon_emoji: ':sadge:'
include_jobs: false