Run Nightly Test #886
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 Nightly Test | |
on: | |
schedule: | |
- cron: '30 3 * * *' | |
jobs: | |
nightly-test: | |
name: Nightly Test | |
if: github.repository == 'openshift-helm-charts/development' | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
token: ${{ secrets.BOT_TOKEN }} | |
fetch-depth: 0 | |
- name: Set up Python 3.x Part 1 | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.10" | |
- name: Set up Python 3.x Part 2 | |
run: | | |
# set up python requirements and scripts | |
python3 -m venv ve1 | |
cd scripts | |
../ve1/bin/pip3 install -r requirements.txt | |
../ve1/bin/pip3 install . | |
cd .. | |
- name: Run All Tests | |
id: run_all_tests | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
BOT_NAME: ${{ secrets.BOT_NAME }} | |
BOT_TOKEN: ${{ secrets.BOT_TOKEN }} | |
PR_BODY: "Test triggered by nightly run." | |
run: | | |
ve1/bin/behave tests/functional/behave_features/ --tags=full --logging-level=WARNING --no-capture --no-color | |
- name: Send message to helm_dev slack channel | |
id: notify_to_dev | |
if: ${{ always() && steps.run_all_tests.conclusion != 'success' }} | |
uses: archive/[email protected] | |
with: | |
slack-bot-user-oauth-access-token: ${{ secrets.SLACK_BOT_USER_OAUTH_ACCESS_TOKEN }} | |
slack-channel: C02979BDUPL | |
slack-text: Failure! Nightly test for certification flow. See '${{github.server_url}}/${{github.repository}}/actions/runs/${{github.run_id}}' | |
- name: Result from "Send Message to helm_dev slack channel" | |
if: ${{ always() && steps.run_all_tests.conclusion != 'success' }} | |
run: echo "The result was ${{ steps.notify_to_dev.outputs.slack-result }}" | |
- name: Send message to helm_notify slack channel | |
id: notify | |
if: ${{ always() && steps.run_all_tests.conclusion == 'success' }} | |
uses: archive/[email protected] | |
with: | |
slack-bot-user-oauth-access-token: ${{ secrets.SLACK_BOT_USER_OAUTH_ACCESS_TOKEN }} | |
slack-channel: C04K1ARMH8A | |
slack-text: Success! Nightly test for certification flow. See '${{github.server_url}}/${{github.repository}}/actions/runs/${{github.run_id}}' | |
- name: Result from "Send Message to helm_notify slack channel" | |
if: ${{ always() && steps.run_all_tests.conclusion == 'success' }} | |
run: echo "The result was ${{ steps.notify.outputs.slack-result }}" |