Skip to content

Commit

Permalink
MG-2216 - Rename delete policy function (absmach#2218)
Browse files Browse the repository at this point in the history
MG-2142 - Consume Things connect/disconnect event in Bootstrap (absmach#2192)
NOISSUE - add CreatedAt and UpdatedAt fields for mgclients.Client (absmach#2306)
NOISSUE - Fix failed log message (absmach#2307)
MF-2299 - Update influxdb2 volumes path (absmach#2300)
NOISSUE - Remove redundant relation check (absmach#2197)
NOISSUE - Add domain events for Auth service (absmach#2313)
NOISSUE - Update CI tools (absmach#2314)
MG-888 - Update consumers SDK tests (absmach#2271)
MG-888 - Add bootstrap SDK tests (absmach#2261)
MG-2026 - Fix JSON page response key from groups to channels (absmach#2298)
MG-1965 - Process Event Logs (absmach#2057)
MG-1529 - User Removal (absmach#2122)
  • Loading branch information
Andy Chao committed Sep 10, 2024
1 parent f839e75 commit 38f80c8
Show file tree
Hide file tree
Showing 185 changed files with 7,951 additions and 2,316 deletions.
Binary file modified .DS_Store
Binary file not shown.
20 changes: 19 additions & 1 deletion .github/workflows/api-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ on:
- "consumers/notifiers/api/**"
- "http/api/**"
- "invitations/api/**"
- "journal/api/**"
- "provision/api/**"
- "readers/api/**"
- "things/api/**"
Expand Down Expand Up @@ -44,6 +45,7 @@ env:
TIMESCALE_READER_URL: http://localhost:9011
SMPP_NOTIFIER_URL: http://localhost:9014
SMTP_NOTIFIER_URL: http://localhost:9015
JOURNAL_URL: http://localhost:9021

jobs:
api-test:
Expand Down Expand Up @@ -78,6 +80,11 @@ jobs:
id: changes
with:
filters: |
journal:
- ".github/workflows/api-tests.yml"
- "api/openapi/journal.yml"
- "journal/api/**"
auth:
- ".github/workflows/api-tests.yml"
- "api/openapi/auth.yml"
Expand Down Expand Up @@ -182,7 +189,18 @@ jobs:
checks: all
report: false
args: '--header "Authorization: Bearer ${{ env.USER_TOKEN }}" --contrib-openapi-formats-uuid --hypothesis-suppress-health-check=filter_too_much --stateful=links'


- name: Run Journal API tests
if: steps.changes.outputs.journal == 'true'
uses: schemathesis/action@v1
with:
schema: api/openapi/journal.yml
base-url: ${{ env.JOURNAL_URL }}
checks: all
report: false
args: '--header "Authorization: Bearer ${{ env.USER_TOKEN }}" --contrib-openapi-formats-uuid --hypothesis-suppress-health-check=filter_too_much --stateful=links'


- name: Run Bootstrap API tests
if: steps.changes.outputs.bootstrap == 'true'
uses: schemathesis/action@v1
Expand Down
11 changes: 8 additions & 3 deletions .github/workflows/check-generated-files.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,13 +75,14 @@ jobs:
- "twins/twins.go"
- "twins/states.go"
- "twins/service.go"
- "journal/journal.go"
- name: Set up protoc
if: steps.changes.outputs.proto == 'true'
run: |
PROTOC_VERSION=25.3
PROTOC_GEN_VERSION=v1.32.0
PROTOC_GRPC_VERSION=v1.3.0
PROTOC_VERSION=27.1
PROTOC_GEN_VERSION=v1.34.2
PROTOC_GRPC_VERSION=v1.4.0
# Download and install protoc
PROTOC_ZIP=protoc-$PROTOC_VERSION-linux-x86_64.zip
Expand Down Expand Up @@ -157,6 +158,8 @@ jobs:
mv ./twins/mocks/states.go ./twins/mocks/states.go.tmp
mv ./twins/mocks/repository.go ./twins/mocks/repository.go.tmp
mv ./twins/mocks/cache.go ./twins/mocks/cache.go.tmp
mv ./journal/mocks/repository.go ./journal/mocks/repository.go.tmp
mv ./journal/mocks/service.go ./journal/mocks/service.go.tmp
make mocks
Expand Down Expand Up @@ -208,3 +211,5 @@ jobs:
check_mock_changes ./twins/mocks/states.go "Twins States ./twins/mocks/states.go"
check_mock_changes ./twins/mocks/repository.go "Twins Repository ./twins/mocks/repository.go"
check_mock_changes ./twins/mocks/cache.go "Twins Cache ./twins/mocks/cache.go"
check_mock_changes ./journal/mocks/repository.go "Journal Repository ./journal/mocks/repository.go"
check_mock_changes ./journal/mocks/service.go "Journal Service ./journal/mocks/service.go"
15 changes: 14 additions & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
- name: golangci-lint
uses: golangci/golangci-lint-action@v6
with:
version: v1.57.2
version: v1.59.1

- name: Build all Binaries
run: |
Expand Down Expand Up @@ -116,6 +116,14 @@ jobs:
- "pkg/uuid/**"
- "pkg/messaging/**"
journal:
- "journal/**"
- "cmd/journal/**"
- "auth.pb.go"
- "auth_grpc.pb.go"
- "auth/**"
- "pkg/events/**"
http:
- "http/**"
- "cmd/http/**"
Expand Down Expand Up @@ -267,6 +275,11 @@ jobs:
- name: Create coverage directory
run: |
mkdir coverage
- name: Run Journal tests
if: steps.changes.outputs.journal == 'true' || steps.changes.outputs.workflow == 'true'
run: |
go test --race -v -count=1 -coverprofile=coverage/journal.out ./journal/...
- name: Run auth tests
if: steps.changes.outputs.auth == 'true' || steps.changes.outputs.workflow == 'true'
Expand Down
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ BUILD_DIR = build
SERVICES = auth users things http coap ws mqtt invitations \
influxdb-writer influxdb-reader mongodb-writer mongodb-reader smtp-notifier smpp-notifier \
cassandra-writer cassandra-reader postgres-writer postgres-reader timescale-writer timescale-reader \
cli bootstrap opcua twins lora provision certs vault
TEST_API_SERVICES = auth bootstrap certs http invitations notifiers provision readers things twins users
cli bootstrap opcua twins lora provision certs vault journal
TEST_API_SERVICES = journal auth bootstrap certs http invitations notifiers provision readers things twins users
TEST_API = $(addprefix test_api_,$(TEST_API_SERVICES))
DOCKERS = $(addprefix docker_,$(SERVICES))
DOCKERS_DEV = $(addprefix docker_dev_,$(SERVICES))
Expand All @@ -27,7 +27,7 @@ DOCKER_PROJECT ?= $(shell echo $(subst $(space),,$(USER_REPO)) | tr -c -s '[:aln
DOCKER_COMPOSE_COMMANDS_SUPPORTED := up down config
DEFAULT_DOCKER_COMPOSE_COMMAND := up
GRPC_MTLS_CERT_FILES_EXISTS = 0
MOCKERY_VERSION=v2.42.3
MOCKERY_VERSION=v2.43.2
ifneq ($(MG_MESSAGE_BROKER_TYPE),)
MG_MESSAGE_BROKER_TYPE := $(MG_MESSAGE_BROKER_TYPE)
else
Expand Down Expand Up @@ -76,7 +76,7 @@ endef
ADDON_SERVICES = bootstrap cassandra-reader cassandra-writer certs \
influxdb-reader influxdb-writer lora-adapter mongodb-reader mongodb-writer \
opcua-adapter postgres-reader postgres-writer provision smpp-notifier smtp-notifier \
timescale-reader timescale-writer twins vault
timescale-reader timescale-writer twins vault journal

EXTERNAL_SERVICES = vault prometheus

Expand Down
Loading

0 comments on commit 38f80c8

Please sign in to comment.