-
Notifications
You must be signed in to change notification settings - Fork 1
41 lines (41 loc) · 1.25 KB
/
deploy.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
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' }}