Skip to content

feat ci: fixes for the docker.yaml #9

feat ci: fixes for the docker.yaml

feat ci: fixes for the docker.yaml #9

Workflow file for this run

name: Docker build
'on':
schedule:
- cron: '30 5 * * 1' # Every Monday at 5:30
pull_request:
push:
branches:
- master
- develop
- feature/**
jobs:
tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Reuse ccache directory
uses: actions/cache@v4
with:
path: .ccache
key: 'ccache-dir-${{github.ref}}_run-${{github.run_number}}'
restore-keys: |
ccache-dir-${{github.ref}}_run-
ccache-
- name: Install docker-compose
run: |
sudo apt update
sudo apt install --allow-downgrades -y docker-compose
- name: Setup ccache
run: docker-compose run --rm mongo_grpc_service_template-container bash -c 'ccache -M 2.0GB && ccache -s'
- name: Install mongo
run: |
docker-compose run --rm mongo_grpc_service_template-container bash -c '
wget -qO- https://pgp.mongodb.com/server-7.0.asc | sudo gpg --dearmor | sudo tee /usr/share/keyrings/mongodb-server-7.0.gpg >/dev/null
echo "deb [ arch=amd64,arm64 signed-by=/usr/share/keyrings/mongodb-server-7.0.gpg ] https://repo.mongodb.org/apt/ubuntu jammy/mongodb-org/7.0 multiverse" \
| sudo tee -a /etc/apt/sources.list.d/mongodb-org-7.0.list
apt update
apt install -y mongodb-org mongodb-mongosh
'
- name: Cmake
run: make docker-cmake-release
- name: Build
run: make docker-build-release
- name: Run tests
run: make docker-test-release