Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add github actions #214

Merged
merged 1 commit into from
Jul 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
105 changes: 0 additions & 105 deletions .circleci/config.yml

This file was deleted.

21 changes: 21 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: ci

on:
pull_request:
branches:
- '**'

jobs:
lint_test:
uses: babylonchain/.github/.github/workflows/[email protected]
with:
run-unit-tests: true
run-integration-tests: false
run-lint: false

docker_pipeline:
uses: babylonchain/.github/.github/workflows/[email protected]
secrets: inherit
with:
publish: false
dockerfile: ./contrib/images/staking-api-service/Dockerfile
25 changes: 25 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: docker_publish

on:
push:
branches:
- 'main'
- 'dev'
tags:
- '*'

jobs:
lint_test:
uses: babylonchain/.github/.github/workflows/[email protected]
with:
run-unit-tests: true
run-integration-tests: false
run-lint: false

docker_pipeline:
needs: ["lint_test"]
uses: babylonchain/.github/.github/workflows/[email protected]
secrets: inherit
with:
publish: true
dockerfile: ./contrib/images/staking-api-service/Dockerfile
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ generate-mock-interface:
cd internal/clients/ordinals && mockery --name=OrdinalsClientInterface --output=../../../tests/mocks --outpkg=mocks --filename=mock_ordinal_client.go
cd internal/clients/unisat && mockery --name=UnisatClientInterface --output=../../../tests/mocks --outpkg=mocks --filename=mock_unisat_client.go

tests:
test:
./bin/local-startup.sh;
go test -v -cover -p 1 ./... -count=1

Expand Down
5 changes: 3 additions & 2 deletions bin/local-startup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ if [ $(docker ps -q -f name=^/${MONGO_CONTAINER_NAME}$) ]; then
else
echo "Starting MongoDB"
# Start MongoDB
docker-compose up mongodb -d
docker-compose up -d mongodb
fi

# Check if the RabbitMQ container is already running
Expand All @@ -17,5 +17,6 @@ if [ $(docker ps -q -f name=^/${RABBITMQ_CONTAINER_NAME}$) ]; then
else
echo "Starting RabbitMQ"
# Start RabbitMQ
docker-compose up rabbitmq -d
docker-compose up -d rabbitmq
sleep 10
fi
Loading