feat: add first functions for PubChem tool #15
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: | |
pull_request_target: | |
branches: | |
- main | |
push: | |
branches: | |
- main | |
workflow_dispatch: | |
jobs: | |
modal_deploy_test: | |
name: Deploy and test | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: 3.12 | |
- name: Install uv | |
run: pip install uv | |
- name: Create virtual environment and install dependencies | |
run: | | |
uv venv | |
. .venv/bin/activate | |
uv pip install -e ".[dev]" | |
- name: Deploy to dev | |
run: chemenv deploy | |
env: | |
MODAL_TOKEN_ID: ${{ secrets.MODAL_TOKEN_ID }} | |
MODAL_TOKEN_SECRET: ${{ secrets.MODAL_TOKEN_SECRET }} | |
CHEMENV_NAME: ${{ github.event_name == 'pull_request' && github.ref == 'refs/heads/main' && '' || '-dev' }} | |
- name: Run tests | |
run: python tests/test_modal.py | |
env: | |
MODAL_TOKEN_ID: ${{ secrets.MODAL_TOKEN_ID }} | |
MODAL_TOKEN_SECRET: ${{ secrets.MODAL_TOKEN_SECRET }} | |
CHEMENV_NAME: ${{ github.event_name == 'pull_request' && github.ref == 'refs/heads/main' && '' || '-dev' }} |