Testops Report WEEKLY #137
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: Testops Report WEEKLY | |
# Sat. @4am UTC | |
on: | |
schedule: | |
- cron: "0 4 * * 6" | |
workflow_dispatch: | |
jobs: | |
deploy: | |
name: TestOps Report (WEEKLY) | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out source repository | |
uses: actions/checkout@v2 | |
- name: Setup python | |
uses: actions/setup-python@v1 | |
- name: Establish Cloud SQL Proxy | |
uses: mattes/gce-cloudsql-proxy-action@v1 | |
with: | |
creds: ${{ secrets.GCLOUD_AUTH }} | |
instance: ${{ secrets.CLOUD_SQL_CONNECTION_NAME }} | |
port: ${{ secrets.CLOUD_SQL_DATABASE_PORT }} | |
- name: Install requirements | |
run: pip install -r requirements.txt | |
- name: Set env vars | |
run: | | |
echo "CLOUD_SQL_DATABASE_USERNAME=${{ secrets.CLOUD_SQL_DATABASE_USERNAME }}" >> $GITHUB_ENV | |
echo "CLOUD_SQL_DATABASE_PASSWORD=${{ secrets.CLOUD_SQL_DATABASE_PASSWORD }}" >> $GITHUB_ENV | |
echo "CLOUD_SQL_DATABASE_NAME=production" >> $GITHUB_ENV | |
echo "CLOUD_SQL_DATABASE_PORT=${{ secrets.CLOUD_SQL_DATABASE_PORT }}" >> $GITHUB_ENV | |
echo "TESTRAIL_HOST=${{ secrets.TESTRAIL_HOST }}" >> $GITHUB_ENV | |
echo "TESTRAIL_USERNAME=${{ secrets.TESTRAIL_USERNAME }}" >> $GITHUB_ENV | |
echo "TESTRAIL_PASSWORD=${{ secrets.TESTRAIL_PASSWORD }}" >> $GITHUB_ENV | |
echo "GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }}" >> $GITHUB_ENV | |
#- name: Update DB - test runs | |
# run: python ./__main__.py --report-type test-run-counts --project ALL --num-days 7 | |
- name: Update DB - test coverage | |
run: python ./__main__.py --report-type test-case-coverage --platform mobile --project ALL | |
- name: Set job log URL | |
if: always() | |
run: echo "JOB_LOG_URL=https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}" >> $GITHUB_ENV | |
- name: Send custom JSON data to Slack workflow | |
if: always() | |
id: slack | |
uses: slackapi/slack-github-action@v1.26.0 | |
env: | |
JOB_STATUS: ${{ job.status == 'success' && ':white_check_mark:' || job.status == 'failure' && ':x:' }} | |
JOB_STATUS_COLOR: ${{ job.status == 'success' && '#36a64f' || job.status == 'failure' && '#FF0000' }} | |
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL_MOBILE_ALERTS_TOOLING }} | |
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK | |
with: | |
payload-file-path: "./payload-slack-content.json" |