| 1 |
name: integration tests |
| 2 |
on: |
| 3 |
workflow_dispatch: |
| 4 |
schedule: |
| 5 |
- cron: "0 0 * * SUN" # run every Sunday at midnight |
| 6 |
|
| 7 |
env: |
| 8 |
PYTHON_VERSION: "3.10" |
| 9 |
|
| 10 |
jobs: |
| 11 |
test_integration: |
| 12 |
runs-on: ubuntu-latest |
| 13 |
steps: |
| 14 |
- uses: actions/checkout@v5 |
| 15 |
- name: Install uv |
| 16 |
uses: astral-sh/[email protected] |
| 17 |
with: |
| 18 |
python-version: ${{ env.PYTHON_VERSION }} |
| 19 |
|
| 20 |
- name: Install system dependencies |
| 21 |
run: | |
| 22 |
sudo apt update |
| 23 |
sudo apt install --yes --no-install-recommends \ |
| 24 |
ffmpeg \ |
| 25 |
gobject-introspection \ |
| 26 |
gstreamer1.0-plugins-base \ |
| 27 |
imagemagick \ |
| 28 |
libcairo2-dev \ |
| 29 |
libgirepository-2.0-dev \ |
| 30 |
mp3gain \ |
| 31 |
pandoc \ |
| 32 |
python3-gst-1.0 |
| 33 |
|
| 34 |
- name: Install Python tools |
| 35 |
run: uv tool install "poethepoet>=0.26,<0.47.0" |
| 36 |
|
| 37 |
- name: Install dependencies |
| 38 |
run: poe install --group test --extra autobpm --extra discogs --extra lyrics --extra replaygain --extra reflink --extra fetchart --extra chroma --extra sonosupdate --group docs |
| 39 |
|
| 40 |
- name: Test |
| 41 |
env: |
| 42 |
INTEGRATION_TEST: 1 |
| 43 |
LYRICS_UPDATED: 1 |
| 44 |
run: | |
| 45 |
poe docs |
| 46 |
poe test |
| 47 |
|
| 48 |
- name: Check external links in docs |
| 49 |
run: poe check-docs-links |
| 50 |
|
| 51 |
- name: Notify on failure |
| 52 |
if: ${{ failure() }} |
| 53 |
env: |
| 54 |
ZULIP_BOT_CREDENTIALS: ${{ secrets.ZULIP_BOT_CREDENTIALS }} |
| 55 |
run: |- |
| 56 |
if [ -z "${ZULIP_BOT_CREDENTIALS}" ]; then |
| 57 |
echo "Skipping notify, ZULIP_BOT_CREDENTIALS is unset" |
| 58 |
exit 0 |
| 59 |
fi |
| 60 |
|
| 61 |
curl -X POST https://beets.zulipchat.com/api/v1/messages \ |
| 62 |
-u "${ZULIP_BOT_CREDENTIALS}" \ |
| 63 |
-d "type=stream" \ |
| 64 |
-d "to=github" \ |
| 65 |
-d "subject=${GITHUB_WORKFLOW} - $(date -u +%Y-%m-%d)" \ |
| 66 |
-d "content=[${GITHUB_WORKFLOW}#${GITHUB_RUN_NUMBER}](${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID}) failed." |