Skip to content

Commit

Permalink
use very short validation for Pull Requests
Browse files Browse the repository at this point in the history
  • Loading branch information
mauwii committed Oct 18, 2022
1 parent 97b26f3 commit b390295
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 8 deletions.
27 changes: 19 additions & 8 deletions .github/workflows/test-invoke-conda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ on:
branches:
- 'main'
- 'development'
pull_request:
branches:
- 'main'
- 'development'

jobs:
os_matrix:
Expand Down Expand Up @@ -33,13 +37,20 @@ jobs:
auto-update-conda: false
miniconda-version: latest

- name: set environment
run: |
[[ "$GITHUB_REF" == 'refs/heads/main' ]] \
&& echo "TEST_PROMPTS=tests/preflight_prompts.txt" >> $GITHUB_ENV \
|| echo "TEST_PROMPTS=tests/dev_prompts.txt" >> $GITHUB_ENV
echo "CONDA_ROOT=$CONDA" >> $GITHUB_ENV
echo "CONDA_ENV_NAME=invokeai" >> $GITHUB_ENV
- name: set test prompt to main branch validation
if: ${{ github.ref == 'refs/heads/main' }}
run: echo "TEST_PROMPTS=tests/preflight_prompts.txt" >> $GITHUB_ENV

- name: set test prompt to development branch validation
if: ${{ github.ref == 'refs/heads/development' }}
run: echo "TEST_PROMPTS=tests/dev_prompts.txt" >> $GITHUB_ENV

- name: set test prompt to Pull Request validation
if: ${{ github.ref != "refs/heads/main" && github.ref != 'refs/heads/development' }}
run: echo "TEST_PROMPTS=tests/pr_prompt.txt" >> $GITHUB_ENV

- name: set conda environment name
run: echo "CONDA_ENV_NAME=invokeai" >> $GITHUB_ENV

- name: Use Cached Stable Diffusion v1.4 Model
id: cache-sd-v1-4
Expand All @@ -65,7 +76,7 @@ jobs:
cache-name: cache-conda-env-${{ env.CONDA_ENV_NAME }}
conda-env-file: ${{ matrix.environment-file }}
with:
path: ${{ env.CONDA_ROOT }}/envs/${{ env.CONDA_ENV_NAME }}
path: ${{ env.CONDA }}/envs/${{ env.CONDA_ENV_NAME }}
key: ${{ env.cache-name }}
restore-keys: ${{ env.cache-name }}-${{ runner.os }}-${{ hashFiles(env.conda-env-file) }}

Expand Down
1 change: 1 addition & 0 deletions tests/pr_prompt.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
banana sushi -Ak_lms -S42 -s10

0 comments on commit b390295

Please sign in to comment.