Ensure that within Github workflow a dummy SL secrets is created #10
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: Test and lint | |
on: | |
push: | |
branches: | |
- main | |
permissions: | |
contents: read | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- uses: actions/setup-python@v3 | |
with: | |
python-version: "3.12" | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install poetry | |
poetry install | |
- name: Create dummy Streamlit secrets | |
run: | | |
mkdir -p .streamlit | |
cat <<EOF > .streamlit/secrets.toml | |
REPLICATE_API_TOKEN = "dummy" | |
[gcp] | |
project_id = "dummy" | |
private_key_id = "dummy" | |
private_key = "dummy" | |
client_email = "dummy" | |
client_id = "dummy" | |
client_x509_cert_url = "dummy" | |
EOF | |
- name: Run tests | |
run: poetry run python -m pytest tests/ -v | |
- name: Lint | |
uses: chartboost/ruff-action@v1 |