run-ge-tests #237
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: run-ge-tests | |
on: | |
workflow_dispatch: | |
schedule: | |
# Every Wednesday at 10am IST | |
- cron: "30 4 * * 3" | |
# Every Friday at 4pm IST | |
- cron: "30 10 * * 5" | |
env: | |
DB_HOST: ${{ secrets.HOST }} | |
DB_PORT: ${{ secrets.DB_PORT }} | |
DB_USERNAME: ${{ secrets.NEWSLETTER_DB_USER }} | |
DB_PASSWORD: ${{ secrets.NEWSLETTER_DB_USER_PASSWORD }} | |
DB_NAME: ${{ secrets.DB_NAME }} | |
NETLIFY_URL: ${{secrets.NETLIFY_URL}} | |
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} | |
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }} | |
SKYPE_API_KEY: ${{ secrets.SKYPE_API_KEY }} | |
SKYPE_CHANNEL: ${{ secrets.SKYPE_CHANNEL }} | |
SKYPE_URL: ${{ secrets.SKYPE_URL }} | |
jobs: | |
great_expectations_validation: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Install python | |
uses: actions/setup-python@v3 | |
- name: Copy Repository contents | |
uses: actions/checkout@main | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install great_expectations | |
pip install pytest | |
pip install pymysql | |
pip install SQLAlchemy==1.4.40 | |
- name: Run CheckpointWednesday10am | |
if: ${{ github.event.schedule == '30 4 * * 3' }} | |
run: | | |
pytest tests/data_validation/great_expectations/utils/ -s -v -m CheckpointWednesday10am | |
- name: Run CheckpointFriday04pm | |
if: ${{ github.event.schedule == '30 10 * * 5' }} | |
run: | | |
pytest tests/data_validation/great_expectations/utils/ -s -v -m CheckpointFriday04pm | |
- name: Deploy DataDocs to Netlify | |
if: always() | |
uses: nwtgck/[email protected] | |
with: | |
publish-dir: "tests/data_validation/great_expectations/uncommitted/data_docs/local_site" | |
production-deploy: true | |
- name: Send Skype notification after run | |
if: always() | |
run: | | |
python tests/data_validation/great_expectations/utils/send_skype_message.py |