-
Notifications
You must be signed in to change notification settings - Fork 3
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 #13 from MaterializeInc/fix-tests
Add CI and fix tests
- Loading branch information
Showing
7 changed files
with
129 additions
and
8 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 |
---|---|---|
@@ -0,0 +1,46 @@ | ||
name: CI | ||
on: | ||
push: | ||
branches: main | ||
tags: "v*.*.*" | ||
pull_request: | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
submodules: true | ||
- name: Setup | ||
run: | | ||
pip install dbt-materialize==1.0.1 | ||
mkdir -p ~/.dbt | ||
cat > ~/.dbt/profiles.yml <<EOF | ||
config: | ||
send_anonymous_usage_stats: False | ||
use_colors: True | ||
integration_tests: | ||
outputs: | ||
materialize: | ||
type: materialize | ||
threads: 1 | ||
host: localhost | ||
port: 6875 | ||
user: materialize | ||
password: ignored | ||
dbname: materialize | ||
schema: public | ||
EOF | ||
- name: Test | ||
run: make test-materialize | ||
working-directory: integration_tests/dbt_utils | ||
- name: Release | ||
uses: softprops/action-gh-release@v1 | ||
if: startsWith(github.ref, 'refs/tags/') | ||
|
||
services: | ||
materialized: | ||
image: materialize/materialized:v0.18.0 | ||
ports: ["6875:6875"] |
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,3 +1,4 @@ | ||
dbt_packages/ | ||
logs/ | ||
target/ | ||
mzdata/ |
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,5 @@ | ||
# materialize-dbt-utils Changelog | ||
|
||
## 0.1.0 - 2021-01-31 | ||
|
||
* Initial release. |
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,20 +1,65 @@ | ||
# Maintainer instructions | ||
|
||
## Bumping dependency versions | ||
|
||
To update the tested version of dbt-materialize, bump the version specification | ||
in the `pip install` invocation in [.github/workflows/main.yml]. | ||
|
||
To update the tested version of `materialized`, bump the version specification | ||
in the `services` specification in [.github/workflows/main.yml]. | ||
|
||
To update the embedded dbt-utils: | ||
|
||
```shell | ||
cd dbt-utils | ||
git checkout main | ||
git pull | ||
cd .. | ||
git commit -am 'Update dbt-utils' | ||
``` | ||
|
||
We explicitly avoid depending on `latest` so that CI is deterministic. New | ||
|
||
## Cutting a new release | ||
|
||
1. Check out the latest `main` branch locally. | ||
|
||
2. Create an annotated tag for the new version: | ||
2. Bump the version number in [dbt_project.yml]. | ||
|
||
3. Add an entry for the new version to [CHANGELOG.md]. | ||
|
||
3. Make a PR with the above changes. | ||
|
||
4. Merge the PR to `main`. | ||
|
||
5. Pull the new commit locally: | ||
|
||
``` | ||
git checkout main | ||
git pull | ||
``` | ||
|
||
6. Verify that you're on the version bump commit: | ||
|
||
``` | ||
git log | ||
# Make sure most recent commit is your version bump. | ||
``` | ||
|
||
5. Create an annotated tag for the new version: | ||
|
||
``` | ||
git tag -a vX.Y.Z -m vX.Y.Z | ||
``` | ||
|
||
3. Push that tag to GitHub: | ||
6. Push that tag to GitHub: | ||
|
||
``` | ||
git push vX.Y.Z | ||
``` | ||
|
||
4. Verify that CI passes on the tag and publishes a GitHub release. | ||
|
||
[.github/workflows/main.yml]: .github/workflows/main.yml | ||
[dbt_project.yml]: dbt_project.yml | ||
[CHANGELOG.md]: CHANGELOG.md |
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