Example with CI - precommited #2
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: Deploy dev and test | |
on: | |
push: | |
branches: | |
- main | |
workflow_dispatch: | |
jobs: | |
modal_deply: | |
name: Deploy | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: 3.12 | |
cache: pip | |
- name: Install Modal | |
run: pip install -r requirements.txt | |
- name: Deploy to dev | |
run: modal deploy tools/deploy.py | |
env: # SEE: https://modal.com/docs/guide/environment_variables#runtime-environment-variables | |
MODAL_DEPLOY_TOKEN: ${{ secrets.MODAL_DEPLOY_TOKEN }} | |
MODAL_TOKEN_ID: ${{ secrets.MODAL_TOKEN_ID }} | |
CHEMENV_NAME: "-dev" | |
- name: Run tests | |
run: pytest tests/ |