Skip to content

Lazy set of recommendations #517

Lazy set of recommendations

Lazy set of recommendations #517

Workflow file for this run

name: Test Docker
on:
push:
branches:
- main
pull_request:
# override default shell for mamba activation
defaults:
run:
shell: bash -el {0}
jobs:
test-docker:
name: Build and test Docker image
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install environment
uses: prefix-dev/setup-pixi@v0.8.1
with:
pixi-version: v0.29.0
cache: true
cache-write: ${{ github.event_name == 'push' && github.ref_name == 'main' }}
environments: data
activate-environment: true
- name: Cache model data
uses: actions/cache@v4
with:
path: .dvc/cache
key: docker-dvc-cache-${{ hashFiles('models/**.dvc') }}
- name: Fetch model data
run: |
dvc pull -R models
env:
AWS_ACCESS_KEY_ID: ${{secrets.AWS_ACCESS_KEY_ID}}
AWS_SECRET_ACCESS_KEY: ${{secrets.AWS_SECRET_ACCESS_KEY}}
- name: Build Docker image
run: |
docker build -t poprox-recommender:ci --build-arg LOG_LEVEL=DEBUG .
- name: Start Docker container
run: |
docker run -d -p 9000:8080 --name=poprox-recommender poprox-recommender:ci
- name: Submit test request
run: |
python ./tests/integration/test-docker-lambda.py
- name: Dump Docker logs
if: always()
run: |
docker logs poprox-recommender
- name: Tear down Docker
if: always()
run: |
docker stop poprox-recommender
docker rm poprox-recommender
docker image rm poprox-recommender:ci