Testops Report PUSH #104
Workflow file for this run
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 PUSH | |
on: | |
#push: | |
# branches: | |
# - master | |
workflow_dispatch: | |
inputs: | |
branchName: | |
description: 'Default branch' | |
required: true | |
default: 'master' | |
jobs: | |
deploy: | |
name: Update testops DB | |
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=staging-2024-03-12" >> $GITHUB_ENV | |
echo "CLOUD_SQL_DATABASE_PORT=${{ secrets.CLOUD_SQL_DATABASE_PORT }}" >> $GITHUB_ENV | |
echo "TESTRAIL_HOST=${{ secrets.TESTRAIL_HOST_TEST }}" >> $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 fenix --start-date 2021-08-15 --end-date 2021-10-01 | |
- name: Update DB - test coverage | |
#run: python ./__main__.py --report-type test-case-coverage --project ALL | |
run: echo "hello" | |
#run: python ./__main__.py --report-type test-case-coverage --project fenix | |
- name: Send custom JSON data to Slack workflow | |
if: always() | |
id: slack | |
uses: slackapi/slack-github-action@v1.26.0 | |
env: | |
PULL_REQUEST_JOB_STATUS: ${{ job.status }} | |
PULL_REQUEST_URL: ${{ github.event.pull_request.html_url }} | |
PULL_REQUEST_JOB_STATUS_COLOR: ${{ job.status == 'success' && vars.COLOR_GREEN || job.status == 'failure' && vars.COLOR_RED || vars.COLOR_ORANGE }} | |
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} | |
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK | |
with: | |
payload-file-path: "./payload-slack-content.json" | |
payload-file-path-parsed: false | |