diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1052702..258da33 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,7 +8,6 @@ on: - 'bin/make_template' - 'docs/*' - '**/.gitignore' - - '.python-version' - 'LICENSE' - '*.md' workflow_dispatch: diff --git a/.github/workflows/slack.yml b/.github/workflows/slack.yml new file mode 100644 index 0000000..3198a29 --- /dev/null +++ b/.github/workflows/slack.yml @@ -0,0 +1,18 @@ +name: Slack +on: + workflow_run: + workflows: [CI] + types: [completed] + branches: [main] +jobs: + on-failure: + runs-on: ubuntu-latest + if: ${{ github.event.workflow_run.conclusion == 'failure' }} + steps: + - name: Post to Slack + uses: slackapi/slack-github-action@v1.24.0 + with: + channel-id: 'C4K6M7P5E' + slack-message: "A workflow run failed\n*Repo:* `${{ github.event.repository.full_name }}` (${{ github.event.repository.html_url }})\n*Workflow:* ${{ github.event.workflow.name }} (${{ github.event.workflow.html_url }})\n*Branch:* `${{ github.event.workflow_run.head_branch }}`\n*Commit:* `${{ github.event.workflow_run.head_commit.id }}`\n*Run:* ${{ github.event.workflow_run.html_url }}\n*Conclusion:* ${{ github.event.workflow_run.conclusion }}" + env: + SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }} diff --git a/tox.ini b/tox.ini index 500e248..60c81bb 100644 --- a/tox.ini +++ b/tox.ini @@ -18,6 +18,7 @@ setenv = dev: SENTRY_ENVIRONMENT = {env:SENTRY_ENVIRONMENT:dev} dev: NEW_RELIC_APP_NAME = {env:NEW_RELIC_APP_NAME:tox-faster} dev: NEW_RELIC_ENVIRONMENT = {env:NEW_RELIC_ENVIRONMENT:dev} + dev,tests,functests: PYTHONDEVMODE = {env:PYTHONDEVMODE:1} tests,functests: PYTEST_PLUGINS = tests.pytest_plugins.factory_boy passenv = HOME