-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into 144-add-macros-to-reduce-boilerplate
- Loading branch information
Showing
50 changed files
with
390 additions
and
24 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,26 @@ | ||
name: Conventional commits | ||
on: | ||
pull_request: | ||
types: | ||
- opened | ||
- edited | ||
- synchronize | ||
- reopened | ||
|
||
jobs: | ||
lint_pr_title: | ||
name: Lint PR title | ||
runs-on: ubuntu-24.04 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: Setup Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 20.x | ||
- name: Install commitlint | ||
run: | | ||
npm install @commitlint/config-conventional | ||
npm install commitlint@latest | ||
- name: Lint title | ||
run: npx --no -- commitlint <<< "${{ github.event.pull_request.title }}" |
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,25 @@ | ||
name: Release | ||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
release: | ||
name: Release | ||
runs-on: ubuntu-24.04 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
persist-credentials: false | ||
- name: Setup Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 20.x | ||
- name: Install Semantic Release and plugins | ||
run: npm install -g semantic-release @semantic-release/git @semantic-release/changelog @semantic-release/github @semantic-release/commit-analyzer @semantic-release/release-notes-generator | ||
- name: Release | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GH_ADMIN_TOKEN }} | ||
run: npx semantic-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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{ | ||
"branches": ["main"], | ||
"plugins": [ | ||
"@semantic-release/commit-analyzer", | ||
"@semantic-release/release-notes-generator", | ||
[ | ||
"@semantic-release/changelog", | ||
{ | ||
"changelogFile": "CHANGELOG.md" | ||
} | ||
], | ||
[ | ||
"@semantic-release/git", | ||
{ | ||
"assets": [ | ||
"CHANGELOG.md" | ||
] | ||
} | ||
], | ||
"@semantic-release/github" | ||
] | ||
} |
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,12 @@ | ||
# 1.0.0 (2024-08-27) | ||
|
||
|
||
### Bug Fixes | ||
|
||
* **#145:** docker compose instead of docker-compose ([b4ecea6](https://github.com/medic/cht-pipeline/commit/b4ecea6ac3abddd2d49e66dbd30a87409eae91dd)), closes [#145](https://github.com/medic/cht-pipeline/issues/145) | ||
|
||
|
||
### Features | ||
|
||
* **#148:** add automatic releases and versioning ([#152](https://github.com/medic/cht-pipeline/issues/152)) ([52cf12a](https://github.com/medic/cht-pipeline/commit/52cf12a50083a1f343a138cb4c5e1e5166644d7a)), closes [#148](https://github.com/medic/cht-pipeline/issues/148) | ||
* **#72:** Replace hardcoded values with env variables ([#73](https://github.com/medic/cht-pipeline/issues/73)) ([3dfa8e7](https://github.com/medic/cht-pipeline/commit/3dfa8e710ae45531f999788f17124a78d69d46d0)), closes [#72](https://github.com/medic/cht-pipeline/issues/72) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
module.exports = { extends: ['@commitlint/config-conventional'] }; | ||
|
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
unit_tests: | ||
- name: test_contact_model_transformation_and_data_integrity | ||
description: | | ||
This unit test validates the transformation logic in the `contact` model and ensures data integrity. | ||
It uses fixture data for both `document_metadata` and `source_table` to test the complete logic. | ||
model: contact | ||
overrides: | ||
macros: | ||
is_incremental: false | ||
given: | ||
- input: ref('document_metadata') | ||
format: csv | ||
fixture: contact_document_metadata_initial | ||
- input: source('couchdb', "{{ env_var('POSTGRES_TABLE') }}") | ||
format: csv | ||
fixture: contact_source_table_initial | ||
expect: | ||
format: csv | ||
fixture: contact_initial_expected | ||
|
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,19 @@ | ||
unit_tests: | ||
- name: test_patient_model_transformation_and_data_integrity | ||
description: | | ||
This unit test validates the transformation logic in the `patient` model and ensures data integrity. | ||
It uses fixture data for both `person` and `couchdb` to test the complete logic. | ||
model: patient | ||
overrides: | ||
macros: | ||
is_incremental: false | ||
given: | ||
- input: ref('person') | ||
format: csv | ||
fixture: patient_person_initial | ||
- input: source('couchdb', "{{ env_var('POSTGRES_TABLE') }}") | ||
format: csv | ||
fixture: patient_source_table_initial | ||
expect: | ||
format: csv | ||
fixture: patient_initial_expected |
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,19 @@ | ||
unit_tests: | ||
- name: test_person_model_transformation_and_data_integrity | ||
description: | | ||
This unit test validates the transformation logic in the `person` model and ensures data integrity. | ||
It uses fixture data for `contact` and `couchdb` to test the complete logic. | ||
model: person | ||
overrides: | ||
macros: | ||
is_incremental: false | ||
given: | ||
- input: ref('contact') | ||
format: csv | ||
fixture: person_contact_initial | ||
- input: source('couchdb', "{{ env_var('POSTGRES_TABLE') }}") | ||
format: csv | ||
fixture: person_source_table_initial | ||
expect: | ||
format: csv | ||
fixture: person_initial_expected |
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,19 @@ | ||
unit_tests: | ||
- name: test_place_model_transformation_and_data_integrity | ||
description: | | ||
This unit test validates the transformation logic in the `place` model and ensures data integrity. | ||
It uses fixture data for both `contact` and `couchdb` to test the complete logic. | ||
model: place | ||
overrides: | ||
macros: | ||
is_incremental: false | ||
given: | ||
- input: ref('contact') | ||
format: csv | ||
fixture: place_contact_initial | ||
- input: source('couchdb', "{{ env_var('POSTGRES_TABLE') }}") | ||
format: csv | ||
fixture: place_source_table_initial | ||
expect: | ||
format: csv | ||
fixture: place_initial_expected |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
version: 2 | ||
|
||
unit_tests: | ||
- name: test_data_record_model_transformation_and_data_integrity | ||
description: | | ||
This unit test validates the transformation logic in the `data_record` model and ensures data integrity. | ||
It uses fixture data for both `document_metadata` and `couchdb` to test the complete logic. | ||
model: data_record | ||
overrides: | ||
macros: | ||
is_incremental: false | ||
given: | ||
- input: ref('document_metadata') | ||
format: csv | ||
fixture: data_record_document_metadata_initial | ||
- input: source('couchdb', "{{ env_var('POSTGRES_TABLE') }}") | ||
format: csv | ||
fixture: data_record_source_table_initial | ||
expect: | ||
format: csv | ||
fixture: data_record_initial_expected |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
unit_tests: | ||
- name: test_document_metadata | ||
model: document_metadata | ||
overrides: | ||
macros: | ||
is_incremental: false | ||
given: | ||
- input: source('couchdb', "{{ env_var('POSTGRES_TABLE') }}") | ||
format: csv | ||
fixture: document_metadata_initial | ||
expect: | ||
format: csv | ||
fixture: document_metadata_initial_expected | ||
|
Oops, something went wrong.