Add CI test to ensure recommender runs directly and with serverless offline #3
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: Source Tests | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
# override default shell for mamba activation | |
defaults: | |
run: | |
shell: bash -el {0} | |
jobs: | |
serverless-smoketest: | |
name: Smoke-test the recommender with Serverless Offline | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Install environment | |
uses: mamba-org/setup-micromamba@v1 | |
with: | |
environment-file: conda-lock.yml | |
environment-name: poprox | |
create-args: --category main --category dev | |
- name: Install Node dependencies | |
run: | | |
npm ci | |
- name: Fetch model data | |
run: | | |
dvc pull -R src/models | |
env: | |
AWS_ACCESS_KEY_ID: ${{secrets.AWS_ACCESS_KEY_ID}} | |
AWS_SECRET_ACCESS_KEY: ${{secrets.AWS_SECRET_ACCESS_KEY}} | |
- name: Start and test Serverless container | |
run: | | |
npx serverless offline start & | |
curl -vf -XPOST http://localhost:3000 --data @tests/basic-request.json |