File tree Expand file tree Collapse file tree 17 files changed +565
-125
lines changed Expand file tree Collapse file tree 17 files changed +565
-125
lines changed Original file line number Diff line number Diff line change
1
+ name : Install frontend dependencies
2
+ description : Installs frontend dependencies with pnpm, with caching
3
+ runs :
4
+ using : ' composite'
5
+ steps :
6
+ - name : Setup Node 18
7
+ uses : actions/setup-node@v4
8
+ with :
9
+ node-version : ' 18'
10
+
11
+ - name : Setup pnpm
12
+ uses : pnpm/action-setup@v2
13
+ with :
14
+ version : 8
15
+ run_install : false
16
+
17
+ - name : Get pnpm store directory
18
+ shell : bash
19
+ run : |
20
+ echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
21
+
22
+ - uses : actions/cache@v3
23
+ name : Setup pnpm cache
24
+ with :
25
+ path : ${{ env.STORE_PATH }}
26
+ key : ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
27
+ restore-keys : |
28
+ ${{ runner.os }}-pnpm-store-
29
+
30
+ - name : Install frontend dependencies
31
+ run : pnpm install --prefer-frozen-lockfile
32
+ shell : bash
33
+ working-directory : invokeai/frontend/web
Original file line number Diff line number Diff line change
1
+ name : Install python dependencies
2
+ description : Install python dependencies with pip, with caching
3
+ runs :
4
+ using : ' composite'
5
+ steps :
6
+ - name : Setup python
7
+ uses : actions/setup-python@v5
8
+ with :
9
+ python-version : ' 3.10'
10
+ cache : pip
11
+ cache-dependency-path : pyproject.toml
Original file line number Diff line number Diff line change 11
11
- ' docker/docker-entrypoint.sh'
12
12
- ' workflows/build-container.yml'
13
13
tags :
14
- - ' v*'
14
+ - ' v*.*.* '
15
15
workflow_dispatch :
16
16
17
17
permissions :
Original file line number Diff line number Diff line change
1
+ name : ' Check: frontend'
2
+
3
+ on :
4
+ workflow_dispatch :
5
+ workflow_call :
6
+
7
+ defaults :
8
+ run :
9
+ working-directory : invokeai/frontend/web
10
+
11
+ jobs :
12
+ check-frontend :
13
+ runs-on : ubuntu-latest
14
+ steps :
15
+ - uses : actions/checkout@v4
16
+
17
+ - name : Set up frontend
18
+ uses : ./.github/actions/install-frontend-deps
19
+
20
+ - name : Run tsc check
21
+ run : ' pnpm run lint:tsc'
22
+ shell : bash
23
+
24
+ - name : Run dpdm check
25
+ run : ' pnpm run lint:dpdm'
26
+ shell : bash
27
+
28
+ - name : Run eslint check
29
+ run : ' pnpm run lint:eslint'
30
+ shell : bash
31
+
32
+ - name : Run prettier check
33
+ run : ' pnpm run lint:prettier'
34
+ shell : bash
35
+
36
+ - name : Run knip check
37
+ run : ' pnpm run lint:knip'
38
+ shell : bash
Original file line number Diff line number Diff line change 1
- name : Test invoke.py pip
1
+ name : ' Check: pytest'
2
+
2
3
on :
3
- push :
4
- branches :
5
- - ' main'
6
- pull_request :
7
- types :
8
- - ' ready_for_review'
9
- - ' opened'
10
- - ' synchronize'
11
- merge_group :
12
4
workflow_dispatch :
5
+ workflow_call :
13
6
14
7
concurrency :
15
8
group : ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
16
9
cancel-in-progress : true
17
10
18
11
jobs :
19
12
matrix :
20
- if : github.event.pull_request.draft == false
21
13
strategy :
22
14
matrix :
23
15
python-version :
24
- # - '3.9'
25
16
- ' 3.10'
26
17
pytorch :
27
18
- linux-cuda-11_7
@@ -52,43 +43,26 @@ jobs:
52
43
env :
53
44
PIP_USE_PEP517 : ' 1'
54
45
steps :
55
- - name : Checkout sources
56
- id : checkout-sources
57
- uses : actions/checkout@v3
58
-
59
- - name : Check for changed python files
60
- id : changed-files
61
- uses : tj-actions/changed-files@v41
62
- with :
63
- files_yaml : |
64
- python:
65
- - 'pyproject.toml'
66
- - 'invokeai/**'
67
- - '!invokeai/frontend/web/**'
68
- - 'tests/**'
46
+ - uses : actions/checkout@v4
69
47
70
48
- name : set test prompt to main branch validation
71
- if : steps.changed-files.outputs.python_any_changed == 'true'
72
49
run : echo "TEST_PROMPTS=tests/validate_pr_prompt.txt" >> ${{ matrix.github-env }}
73
50
74
51
- name : setup python
75
- if : steps.changed-files.outputs.python_any_changed == 'true'
76
52
uses : actions/setup-python@v4
77
53
with :
78
54
python-version : ${{ matrix.python-version }}
79
55
cache : pip
80
56
cache-dependency-path : pyproject.toml
81
57
82
58
- name : install invokeai
83
- if : steps.changed-files.outputs.python_any_changed == 'true'
84
59
env :
85
60
PIP_EXTRA_INDEX_URL : ${{ matrix.extra-index-url }}
86
61
run : >
87
62
pip3 install
88
63
--editable=".[test]"
89
64
90
65
- name : run pytest
91
- if : steps.changed-files.outputs.python_any_changed == 'true'
92
66
id : run-pytest
93
67
run : pytest
94
68
Original file line number Diff line number Diff line change
1
+ name : ' Check: python'
2
+
3
+ on :
4
+ workflow_dispatch :
5
+ workflow_call :
6
+
7
+ jobs :
8
+ check-backend :
9
+ runs-on : ubuntu-latest
10
+ steps :
11
+ - uses : actions/checkout@v4
12
+
13
+ - name : Install python dependencies
14
+ uses : ./.github/actions/install-python-deps
15
+
16
+ - name : Install ruff
17
+ run : pip install ruff
18
+ shell : bash
19
+
20
+ - name : Ruff check
21
+ run : ruff check --output-format=github .
22
+ shell : bash
23
+
24
+ - name : Ruff format
25
+ run : ruff format --check .
26
+ shell : bash
Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ name : ' On change: run check-frontend'
2
+
3
+ on :
4
+ push :
5
+ branches :
6
+ - ' main'
7
+ pull_request :
8
+ types :
9
+ - ' ready_for_review'
10
+ - ' opened'
11
+ - ' synchronize'
12
+ merge_group :
13
+
14
+ jobs :
15
+ check-changed-frontend-files :
16
+ if : github.event.pull_request.draft == false
17
+ runs-on : ubuntu-latest
18
+ outputs :
19
+ frontend_any_changed : ${{ steps.changed-files.outputs.frontend_any_changed }}
20
+ steps :
21
+ - uses : actions/checkout@v4
22
+
23
+ - name : Check for changed frontend files
24
+ id : changed-files
25
+ uses : tj-actions/changed-files@v40
26
+ with :
27
+ files_yaml : |
28
+ frontend:
29
+ - 'invokeai/frontend/web/**'
30
+
31
+ run-check-frontend :
32
+ needs : check-changed-frontend-files
33
+ if : ${{ needs.check-changed-frontend-files.outputs.frontend_any_changed == 'true' }}
34
+ uses : ./.github/workflows/check-frontend.yml
Original file line number Diff line number Diff line change
1
+ name : ' On change: run check-python'
2
+
3
+ on :
4
+ push :
5
+ branches :
6
+ - ' main'
7
+ pull_request :
8
+ types :
9
+ - ' ready_for_review'
10
+ - ' opened'
11
+ - ' synchronize'
12
+ merge_group :
13
+
14
+ jobs :
15
+ check-changed-python-files :
16
+ if : github.event.pull_request.draft == false
17
+ runs-on : ubuntu-latest
18
+ outputs :
19
+ python_any_changed : ${{ steps.changed-files.outputs.python_any_changed }}
20
+ steps :
21
+ - uses : actions/checkout@v4
22
+
23
+ - name : Check for changed python files
24
+ id : changed-files
25
+ uses : tj-actions/changed-files@v40
26
+ with :
27
+ files_yaml : |
28
+ python:
29
+ - 'pyproject.toml'
30
+ - 'invokeai/**'
31
+ - '!invokeai/frontend/web/**'
32
+ - 'tests/**'
33
+
34
+ run-check-python :
35
+ needs : check-changed-python-files
36
+ if : ${{ needs.check-changed-python-files.outputs.python_any_changed == 'true' }}
37
+ uses : ./.github/workflows/check-python.yml
Original file line number Diff line number Diff line change
1
+ name : ' On change: run pytest'
2
+
3
+ on :
4
+ push :
5
+ branches :
6
+ - ' main'
7
+ pull_request :
8
+ types :
9
+ - ' ready_for_review'
10
+ - ' opened'
11
+ - ' synchronize'
12
+ merge_group :
13
+
14
+ jobs :
15
+ check-changed-python-files :
16
+ if : github.event.pull_request.draft == false
17
+ runs-on : ubuntu-latest
18
+ outputs :
19
+ python_any_changed : ${{ steps.changed-files.outputs.python_any_changed }}
20
+ steps :
21
+ - uses : actions/checkout@v4
22
+
23
+ - name : Check for changed python files
24
+ id : changed-files
25
+ uses : tj-actions/changed-files@v40
26
+ with :
27
+ files_yaml : |
28
+ python:
29
+ - 'pyproject.toml'
30
+ - 'invokeai/**'
31
+ - '!invokeai/frontend/web/**'
32
+ - 'tests/**'
33
+
34
+ run-pytest :
35
+ needs : check-changed-python-files
36
+ if : ${{ needs.check-changed-python-files.outputs.python_any_changed == 'true' }}
37
+ uses : ./.github/workflows/check-pytest.yml
File renamed without changes.
You can’t perform that action at this time.
0 commit comments