Skip to content

Fix Failing Test + Add Caching #4

Fix Failing Test + Add Caching

Fix Failing Test + Add Caching #4

Workflow file for this run

name: Build and Run Integration Tests
on:
push:
# branches: [main]/
pull_request:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
# Caches dependencies separately for each platform.
- name: Cache Docker Dependencies
uses: actions/cache@v3
with:
path: |
root/.ivy2
root/.sbt
key: sbt-${{ runner.os }}-${{ hashFiles('**/build.sbt', '**/project/*.sbt') }}
restore-keys: |
sbt-${{ runner.os }}
# Injects the cache into the Docker build. Path is based on cache path in Dockerfile.
- name: Inject sbt cache into Docker
uses: reproducible-containers/[email protected]
with:
cache-map: |
{
"root/.ivy2": "/root/.ivy2",
"root/.sbt": "/root/.sbt"
}
skip-extraction: ${{ steps.cache.outputs.cache-hit }}
- name: Build Production fEMR Docker Image
uses: docker/build-push-action@v6
with:
context: .
cache-from: type=gha
cache-to: type=gha,mode=max
push: false # Doesn't push to dockerhub on PRs.
tags: femr
- name: Build Integration Test Container
run: cd integration_test;
docker image build -t tester .
- name: Run tests
run: |
docker run \
-v /var/run/docker.sock:/var/run/docker.sock \
-e FEMR_IMAGE_NAME="femr" \
tester