Skip to content

Split ArticleSet into CandidateSet and RecommendationList #663

Split ArticleSet into CandidateSet and RecommendationList

Split ArticleSet into CandidateSet and RecommendationList #663

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/[email protected]
with:
pixi-version: latest
cache: true
cache-write: ${{ github.event_name == 'push' && github.ref_name == 'main' }}
environments: test
activate-environment: true
- name: Show DVC config
run: dvc config --list
- name: Cache model data
uses: actions/cache@v4
with:
path: .dvc/cache
key: docker-dvc-cache-${{ hashFiles('models/**.dvc', 'tests/**.dvc') }}
- name: Fetch model data
run: |
dvc pull -vr public -R models tests
- 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: Run integration tests
run: |
python -m pytest -v tests/integration
env:
POPROX_TEST_TARGET: docker
POPROX_TEST_PORT: 9000
- 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