This repository has been archived by the owner on May 6, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 8
76 lines (60 loc) · 2.2 KB
/
installation-tests.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
# **what?**
# This workflow installs the latest version of each dbt adapter from homebrew.
# It then runs 'dbt --version' to verify the installation was successful.
# If it fails for the scheduled runs, it will post to our team alerts channel.
# **why?**
# This is a simple way to test all adapter installations at a single
# time. It allows us to test them on a schedule as well to check for
# any breaking dependency changes that might happen and alert us on it.
# **when?**
# This workflow will run on a schedule every night and also can be
# manually invoked.
name: Homebrew installation testing
on:
workflow_dispatch:
# run this once per night to ensure no regressions
schedule:
- cron: "0 9,13,18 * * *" # 9:00, 13:00, 18:00 UTC
# no permissions are needed for this workflow
permissions: {}
jobs:
homebrew:
strategy:
fail-fast: false
matrix:
adapter: ['dbt-postgres', 'dbt-redshift', 'dbt-snowflake', 'dbt-bigquery']
os: [macos-11]
runs-on: ${{ matrix.os }}
steps:
- name: "Prepare Brew"
# brew upgrade generates some symlink update warnings that cause failures without the || true.
# They're just that the symlink wasn't updated which is okay to ignore.
# This does cause other errors to be ignored but for this case that's safe since the brew install
# step would likely fail at that point.
run: |
brew update
brew upgrade || true
- name: "Check installed"
run: brew list
- name: "Brew Tap"
run: |
brew tap dbt-labs/dbt
- name: "Brew install ${{ matrix.adapter }}"
run: |
brew install --verbose ${{ matrix.adapter }}
- name: "Verify ${{ matrix.adapter }} version"
run: |
dbt --version
post-failure:
runs-on: ubuntu-latest
needs: homebrew
if: ${{ failure() }}
steps:
- name: Posting scheduled run failures
uses: ravsamhq/notify-slack-action@v2
if: ${{ github.event_name == 'schedule' }}
with:
notification_title: "Homebrew nightly integration test failed"
status: ${{ job.status }}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_DEV_CORE_ALERTS }}