Run Test #11
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 Test | |
run-name: Run Test | |
on: | |
push: | |
branches: | |
- dev | |
jobs: | |
run_test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: "3.10.13" | |
- name: Install Poetry | |
uses: snok/install-poetry@v1 | |
with: | |
virtualenvs-in-project: true | |
- name: Install dependencies | |
run: | | |
poetry install --no-root --no-interaction --only test | |
- name: Pull data and model | |
env: | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
run: | | |
source .venv/bin/activate | |
dvc repro download_data | |
dvc pull live/model/model.pkl live/model/model.onnx | |
- name: Run test | |
run: | | |
source .venv/bin/activate | |
pytest | |
- name: Create report | |
run: | |
poetry install --no-root --no-interaction --only report | |
source .venv/bin/activate | |
make report | |
- name: Set up CML | |
uses: iterative/setup-cml@v2 | |
- name: Create Pull Request | |
env: | |
REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
cml comment create report.md |