ci: try to fix docker memory #130
Workflow file for this run
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
name: Run Tests | |
on: | |
pull_request: | |
branches-ignore: | |
- 'main' | |
push: | |
branches-ignore: | |
- 'main' | |
jobs: | |
test: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
mongodb-version: [ '4.4', '5.0', '6.0', '7.0' ] | |
os: [ ubuntu-latest ] | |
steps: | |
- name: Git Checkout | |
uses: actions/[email protected] | |
- name: Setup TimeZone | |
uses: szenius/[email protected] | |
with: | |
timezoneLinux: "Europe/Berlin" | |
timezoneMacos: "Europe/Berlin" | |
timezoneWindows: "W. Europe Standard Time" | |
- name: Set up JDK | |
uses: coursier/setup-action@v1 | |
with: | |
jvm: graalvm-java17:22.3.3 | |
apps: sbt scala scalac | |
- name: Start MongoDB ${{ matrix.mongodb-version }} | |
uses: MongoCamp/[email protected] | |
with: | |
mongodb-version: ${{ matrix.mongodb-version }} | |
mongodb-port: 4711 | |
- name: Run tests | |
run: sbt test | |
build-test-container: | |
needs: test | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
docker-platform: [ "linux/amd64", "linux/arm64/v8", "linux/arm64" ] | |
steps: | |
- name: Git Checkout | |
uses: actions/[email protected] | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v2 | |
- name: Docker Info | |
run: docker info | |
- name: Build Docker Container on ${{ matrix.docker-platform }} | |
run: docker buildx build --memory=16g --platform=${{ matrix.docker-platform }} . --tag mongocamp-server:test |