-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #29 from lsst-sqre/tickets/DM-45383
DM-45383: Add bot_message support for Slack messages
- Loading branch information
Showing
15 changed files
with
746 additions
and
259 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,8 @@ | ||
name: CI | ||
|
||
env: | ||
PYTHON_VERSION: "3.12" | ||
|
||
"on": | ||
merge_group: {} | ||
pull_request: {} | ||
|
@@ -30,38 +33,32 @@ jobs: | |
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.12" | ||
python-version: ${{ env.PYTHON_VERSION }} | ||
|
||
- name: Run pre-commit | ||
uses: pre-commit/[email protected].0 | ||
uses: pre-commit/[email protected].1 | ||
|
||
test: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 5 | ||
|
||
strategy: | ||
matrix: | ||
python: | ||
- "3.12" | ||
timeout-minutes: 10 | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python }} | ||
|
||
- name: Install nox | ||
run: | | ||
pip install --upgrade pip | ||
pip install --upgrade nox | ||
python-version: ${{ env.PYTHON_VERSION }} | ||
|
||
- name: Start Kafka | ||
run: docker compose -f kafka-compose.yaml up -d | ||
|
||
- name: Run nox | ||
run: "nox -s typing test" | ||
uses: lsst-sqre/run-nox@v1 | ||
with: | ||
cache-dependency: "*/pyproject.toml" | ||
nox-sessions: "typing test" | ||
python-version: ${{ env.PYTHON_VERSION }} | ||
|
||
- name: Stop Kafka | ||
run: docker compose -f kafka-compose.yaml down | ||
|
@@ -85,15 +82,14 @@ jobs: | |
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.11" | ||
|
||
- name: Install nox | ||
run: | | ||
pip install --upgrade pip | ||
pip install --upgrade nox | ||
python-version: ${{ env.PYTHON_VERSION }} | ||
|
||
- name: Run nox | ||
run: "nox -s docs" | ||
uses: lsst-sqre/run-nox@v1 | ||
with: | ||
cache-dependency: "*/pyproject.toml" | ||
nox-sessions: "docs" | ||
python-version: ${{ env.PYTHON_VERSION }} | ||
|
||
# Only attempt documentation uploads for long-lived branches, tagged | ||
# releases, and pull requests from ticket branches. This avoids version | ||
|
@@ -150,7 +146,7 @@ jobs: | |
- name: Build and publish | ||
uses: lsst-sqre/build-and-publish-to-pypi@v2 | ||
with: | ||
python-version: "3.12" | ||
python-version: ${{ env.PYTHON_VERSION }} | ||
upload: "false" | ||
working-directory: "client" | ||
|
||
|
@@ -172,5 +168,5 @@ jobs: | |
- name: Build and publish | ||
uses: lsst-sqre/build-and-publish-to-pypi@v2 | ||
with: | ||
python-version: "3.12" | ||
python-version: ${{ env.PYTHON_VERSION }} | ||
working-directory: "client" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
# This is a separate run of the Python test suite that runs from a schedule, | ||
# doesn't cache the nox environment, and updates pinned dependencies first. | ||
# The purpose is to test compatibility with the latest versions of | ||
# dependencies. | ||
|
||
name: Periodic CI | ||
|
||
env: | ||
# Current supported Python version. For applications, there is generally no | ||
# reason to support multiple Python versions, so all actions are run with | ||
# this version. Quote the version to avoid interpretation as a floating | ||
# point number. | ||
PYTHON_VERSION: "3.12" | ||
|
||
"on": | ||
schedule: | ||
- cron: "0 12 * * 1" | ||
workflow_dispatch: {} | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 10 | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ env.PYTHON_VERSION }} | ||
|
||
- name: Update dependencies | ||
run: | | ||
pip install --upgrade uv | ||
uv venv | ||
source .venv/bin/activate | ||
make update-deps | ||
shell: bash | ||
|
||
- name: Start Kafka | ||
run: docker compose -f kafka-compose.yaml up -d | ||
|
||
- name: Run tests in nox | ||
uses: lsst-sqre/run-nox@v1 | ||
with: | ||
python-version: ${{ env.PYTHON_VERSION }} | ||
nox-sessions: "lint typing test" | ||
|
||
- name: Stop Kafka | ||
run: docker compose -f kafka-compose.yaml down | ||
|
||
- name: Report status | ||
if: failure() | ||
uses: ravsamhq/notify-slack-action@v2 | ||
with: | ||
status: ${{ job.status }} | ||
notify_when: "failure" | ||
notification_title: "Periodic test for {repo} failed" | ||
env: | ||
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_ALERT_WEBHOOK }} |
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
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
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
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
Oops, something went wrong.