Skip to content

Updated manifests to notification-api:23210bc and notification-api:23… #7223

Updated manifests to notification-api:23210bc and notification-api:23…

Updated manifests to notification-api:23210bc and notification-api:23… #7223

Workflow file for this run

name: "Staging smoke test"
on:
push:
branches:
- "release-*"
schedule:
- cron: "0 */3 * * *"
defaults:
run:
shell: bash
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Install libcurl
run: sudo apt-get update && sudo apt-get install libssl-dev libcurl4-openssl-dev
- name: Checkout api
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
with:
repository: cds-snc/notification-api
- name: Set up Python
uses: actions/setup-python@b64ffcaf5b410884ad320a9cfac8866006a109aa # v4.8.0
with:
python-version: "3.10"
- name: Upgrade pip
run: python -m pip install --upgrade pip
- name: Get packages from cache
uses: actions/cache@e12d46a63a90f2fae62d114769bbf2a179198b5c # v3.3.3
with:
path: ~/.local
key: poetry-${{ runner.os }}-${{ env.PYTHON_VERSION }}-${{ hashFiles('**/poetry.lock') }}
restore-keys: |
poetry-${{ runner.os }}-${{ env.PYTHON_VERSION }}-
- name: Install poetry
env:
POETRY_VERSION: "1.3.2"
run: pip install poetry==${POETRY_VERSION} && poetry --version
- name: Install requirements
run: poetry install
- name: Run smoke tests on staging
env:
SMOKE_ADMIN_CLIENT_SECRET: ${{ secrets.SMOKE_ADMIN_CLIENT_SECRET}}
SMOKE_API_HOST_NAME: ${{ secrets.SMOKE_API_HOST_NAME}}
SMOKE_API_KEY: ${{ secrets.SMOKE_API_KEY}}
SMOKE_AWS_ACCESS_KEY_ID: ${{ secrets.SMOKE_AWS_ACCESS_KEY_ID}}
SMOKE_AWS_SECRET_ACCESS_KEY: ${{ secrets.SMOKE_AWS_SECRET_ACCESS_KEY}}
SMOKE_CSV_UPLOAD_BUCKET_NAME: ${{ secrets.SMOKE_CSV_UPLOAD_BUCKET_NAME}}
SMOKE_EMAIL_TEMPLATE_ID: ${{ secrets.SMOKE_EMAIL_TEMPLATE_ID}}
SMOKE_EMAIL_TO: ${{ secrets.SMOKE_EMAIL_TO}}
SMOKE_SMS_TO: ${{ secrets.SMOKE_SMS_TO}}
SMOKE_SERVICE_ID: ${{ secrets.SMOKE_SERVICE_ID}}
SMOKE_SMS_TEMPLATE_ID: ${{ secrets.SMOKE_SMS_TEMPLATE_ID}}
SMOKE_USER_ID: ${{ secrets.SMOKE_USER_ID}}
SMOKE_POLL_TIMEOUT: ${{ secrets.SMOKE_POLL_TIMEOUT}}
run: poetry run make smoke-test
- name: Notify Slack channel if this job failed
if: ${{ failure() }}
run: |
json="{'text':'<!here> Staging smoke tests failed: <https://github.com/cds-snc/notification-manifests/|notification-manifests> !'}"
curl -X POST -H 'Content-type: application/json' --data "$json" ${{ secrets.SLACK_WEBHOOK }}