pFad - Phone/Frame/Anonymizer/Declutterfier! Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

URL: http://github.com/DieProgrammIDE/TaskingAI/commit/3a04d46ceda6c97495c58b594d95c4875e3f6cd9

/> ci: update workflows for backend & inference & plugin · DieProgrammIDE/TaskingAI@3a04d46 · GitHub
Skip to content

Commit 3a04d46

Browse files
committed
ci: update workflows for backend & inference & plugin
1 parent 9d86a99 commit 3a04d46

4 files changed

Lines changed: 51 additions & 26 deletions

File tree

.github/workflows/test-backend.yml

Lines changed: 21 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,19 @@ jobs:
2222
environment: test
2323

2424
steps:
25-
- name: Checkout repo
25+
- name: Checkout repository
2626
uses: actions/checkout@v3
27+
with:
28+
ref: ${{ github.event.pull_request.base.ref }}
29+
repository: ${{ github.repository }}
2730

31+
- name: Checkout forked repository
32+
uses: actions/checkout@v3
33+
with:
34+
ref: ${{ github.event.pull_request.head.ref }}
35+
repository: ${{ github.event.pull_request.head.repo.full_name }}
36+
path: fork
37+
2838
- name: Set short SHA
2939
run: echo "IMAGE_TAG=$(echo ${{ github.sha }} | cut -c 1-7)" >> $GITHUB_ENV
3040

@@ -50,11 +60,11 @@ jobs:
5060
token: ${{ secrets.TASKINGAI_TEST_GH_PAT }}
5161

5262
- name: Install Dependencies
53-
working-directory: backend
63+
working-directory: fork/backend
5464
run: pip install -r requirements.txt
5565

5666
- name: Install Test Dependencies
57-
working-directory: backend
67+
working-directory: fork/backend
5868
run: pip install -r test_requirements.txt
5969

6070
- name: Create Docker network
@@ -91,19 +101,19 @@ jobs:
91101
taskingai/taskingai-plugin:v0.2.10
92102
93103
- name: Download nltk data
94-
working-directory: backend
104+
working-directory: fork/backend
95105
run: |
96106
mkdir nltk_data
97107
python -m nltk.downloader -d nltk_data punkt
98108
99109
- name: Build Docker image
100-
working-directory: backend
110+
working-directory: fork/backend
101111
run: |
102112
docker build -t taskingai/taskingai-server:$IMAGE_TAG .
103113
echo "Build success: taskingai/taskingai-server:${IMAGE_TAG}"
104114
105115
- name: Run Docker image - WEB
106-
working-directory: backend
116+
working-directory: fork/backend
107117
env:
108118
AES_ENCRYPTION_KEY: ${{ env.AES_ENCRYPTION_KEY }}
109119
JWT_SECRET_KEY: ${{ env.JWT_SECRET_KEY }}
@@ -123,7 +133,7 @@ jobs:
123133
taskingai/taskingai-server:$IMAGE_TAG
124134
125135
- name: Run R2 Docker image - API
126-
working-directory: backend
136+
working-directory: fork/backend
127137
env:
128138
AES_ENCRYPTION_KEY: ${{ env.AES_ENCRYPTION_KEY }}
129139
TEST_S3_SECRET_R2: ${{ secrets.TEST_S3_SECRET_R2 }}
@@ -153,11 +163,11 @@ jobs:
153163
sleep 10
154164
155165
- name: Run WEB Tests
156-
working-directory: backend
166+
working-directory: fork/backend
157167
run: bash ./run_web_test.sh
158168

159169
- name: Run R2 API Tests
160-
working-directory: backend
170+
working-directory: fork/backend
161171
run: bash ./run_api_test.sh
162172

163173
- name: Stop Docker container
@@ -166,7 +176,7 @@ jobs:
166176
sleep 5
167177
168178
- name: Run AWS Docker image - API
169-
working-directory: backend
179+
working-directory: fork/backend
170180
env:
171181
AES_ENCRYPTION_KEY: ${{ env.AES_ENCRYPTION_KEY }}
172182
TEST_S3_SECRET_AWS: ${{ secrets.TEST_S3_SECRET_AWS }}
@@ -186,5 +196,5 @@ jobs:
186196
taskingai/taskingai-server:$IMAGE_TAG
187197
188198
- name: Run AWS API Tests
189-
working-directory: backend
199+
working-directory: fork/backend
190200
run: bash ./run_api_test.sh

.github/workflows/test-frontend.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,3 @@ jobs:
3636
run: |
3737
docker build -t taskingai/taskingai-app:$IMAGE_TAG .
3838
echo "Build success: taskingai/taskingai-app:$IMAGE_TAG"
39-
40-
- name: Check spelling of repo
41-
uses: crate-ci/typos@master

.github/workflows/test-inference.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,6 @@ jobs:
4040
- name: Set working directory
4141
run: echo "WORKING_DIRECTORY=fork/${{ env.WORK_DIR }}" >> $GITHUB_ENV
4242

43-
- name: Check spelling of repo
44-
uses: crate-ci/typos@master
45-
working-directory: fork
46-
4743
- name: Get list of changed files
4844
id: files
4945
run: |

.github/workflows/test-plugin.yml

Lines changed: 30 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,22 +21,28 @@ permissions:
2121
jobs:
2222
build-and-test:
2323
runs-on: ubuntu-latest
24-
defaults:
25-
run:
26-
working-directory: ${{ env.WORK_DIR }}
2724
environment: test
2825
steps:
2926
- name: Checkout repository
3027
uses: actions/checkout@v3
3128
with:
32-
fetch-depth: 0
29+
ref: ${{ github.event.pull_request.base.ref }}
30+
repository: ${{ github.repository }}
3331

34-
- name: Check spelling of repo
35-
uses: crate-ci/typos@master
32+
- name: Checkout forked repository
33+
uses: actions/checkout@v3
34+
with:
35+
ref: ${{ github.event.pull_request.head.ref }}
36+
repository: ${{ github.event.pull_request.head.repo.full_name }}
37+
path: fork
38+
39+
- name: Set working directory
40+
run: echo "WORKING_DIRECTORY=fork/${{ env.WORK_DIR }}" >> $GITHUB_ENV
3641

3742
- name: Get list of changed files
3843
id: files
3944
run: |
45+
cd ${{ env.WORKING_DIRECTORY }}
4046
git fetch origen +${{ github.event.pull_request.base.sha }}:refs/remotes/origen/pr-base +${{ github.event.pull_request.head.sha }}:refs/remotes/origen/pr-head
4147
git diff --name-only origen/pr-base origen/pr-head > /tmp/changed_files.txt
4248
echo "CHANGED_FILES<<EOF" >> $GITHUB_ENV
@@ -45,10 +51,13 @@ jobs:
4551
echo "::set-output name=changed_files::$(cat /tmp/changed_files.txt)"
4652
4753
- name: Set short SHA for image tag
48-
run: echo "IMAGE_TAG=$(echo ${{ github.sha }} | cut -c 1-7)" >> $GITHUB_ENV
54+
run: |
55+
cd ${{ env.WORKING_DIRECTORY }}
56+
echo "IMAGE_TAG=$(echo ${{ github.sha }} | cut -c 1-7)" >> $GITHUB_ENV
4957
5058
- name: Check for git tag version
5159
run: |
60+
cd ${{ env.WORKING_DIRECTORY }}
5261
TAG=$(git describe --tags --exact-match 2> /dev/null || echo "")
5362
if [[ -n "$TAG" ]]; then
5463
echo "IMAGE_TAG=${TAG}" >> $GITHUB_ENV
@@ -60,10 +69,13 @@ jobs:
6069
python-version: 3.x
6170

6271
- name: Install Dependencies
63-
run: pip install -r requirements.txt
72+
run: |
73+
cd ${{ env.WORKING_DIRECTORY }}
74+
pip install -r requirements.txt
6475
6576
- name: Build Docker image
6677
run: |
78+
cd ${{ env.WORKING_DIRECTORY }}
6779
docker build -t taskingai/taskingai-plugin:$IMAGE_TAG .
6880
echo "Build success: taskingai/taskingai-plugin:${IMAGE_TAG}"
6981
@@ -73,6 +85,7 @@ jobs:
7385
AES_ENCRYPTION_KEY: ${{ env.AES_ENCRYPTION_KEY }}
7486
TEST_S3_SECRET_R2: ${{ secrets.TEST_S3_SECRET_R2 }}
7587
run: |
88+
cd ${{ env.WORKING_DIRECTORY }}
7689
echo "$PLUGIN_BUNDLE_CREDENTIALS" > .env
7790
echo "$TEST_S3_SECRET_R2" >> .env
7891
docker run -d --name test_container --network=host \
@@ -86,16 +99,19 @@ jobs:
8699
87100
- name: Run Tests
88101
run: |
102+
cd ${{ env.WORKING_DIRECTORY }}
89103
bash ./test/run_test.sh /tmp/changed_files.txt
90104
91105
- name: Run Local Tests
92106
run: |
107+
cd ${{ env.WORKING_DIRECTORY }}
93108
export PATH_TO_VOLUME=./test
94109
export HOST_URL=http://localhost:8030
95110
bash ./test/run_local_test.sh
96111
97112
- name: Stop Docker container
98113
run: |
114+
cd ${{ env.WORKING_DIRECTORY }}
99115
docker stop test_container
100116
sleep 5
101117
@@ -105,6 +121,7 @@ jobs:
105121
AES_ENCRYPTION_KEY: ${{ env.AES_ENCRYPTION_KEY }}
106122
TEST_S3_SECRET_AWS: ${{ secrets.TEST_S3_SECRET_AWS }}
107123
run: |
124+
cd ${{ env.WORKING_DIRECTORY }}
108125
echo "$PLUGIN_BUNDLE_CREDENTIALS" > 1.env
109126
echo "$TEST_S3_SECRET_AWS" >> 1.env
110127
docker run -d --name aws_s3_docker --network=host \
@@ -118,11 +135,13 @@ jobs:
118135
119136
- name: Run S3 without public domain Tests
120137
run: |
138+
cd ${{ env.WORKING_DIRECTORY }}
121139
echo "$TEST_S3_SECRET_AWS" > .env
122140
bash ./test/run_s3_without_test.sh
123141
124142
- name: Stop Docker container
125143
run: |
144+
cd ${{ env.WORKING_DIRECTORY }}
126145
docker stop aws_s3_docker
127146
sleep 5
128147
@@ -132,6 +151,7 @@ jobs:
132151
AES_ENCRYPTION_KEY: ${{ env.AES_ENCRYPTION_KEY }}
133152
TEST_S3_SECRET_R2: ${{ secrets.TEST_S3_SECRET_R2 }}
134153
run: |
154+
cd ${{ env.WORKING_DIRECTORY }}
135155
echo "$PLUGIN_BUNDLE_CREDENTIALS" > 2.env
136156
echo "$TEST_S3_SECRET_R2" >> 2.env
137157
docker run -d --name r2_docker --network=host \
@@ -145,10 +165,12 @@ jobs:
145165
146166
- name: Run S3 with public domain Tests
147167
run: |
168+
cd ${{ env.WORKING_DIRECTORY }}
148169
echo "$TEST_S3_SECRET_R2" > .env
149170
bash ./test/run_s3_with_test.sh
150171
151172
- name: Stop Docker container
152173
run: |
174+
cd ${{ env.WORKING_DIRECTORY }}
153175
docker stop r2_docker
154176
sleep 5

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad © 2024 Your Company Name. All rights reserved.





Check this box to remove all script contents from the fetched content.



Check this box to remove all images from the fetched content.


Check this box to remove all CSS styles from the fetched content.


Check this box to keep images inefficiently compressed and original size.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy