Skip to content

Commit

Permalink
update integration test workflow
Browse files Browse the repository at this point in the history
Signed-off-by: Anupam Kumar <[email protected]>
  • Loading branch information
kyteinsky committed Aug 2, 2024
1 parent 558225b commit cb327f3
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions .github/workflows/integration-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,15 +102,18 @@ jobs:
./occ maintenance:install --verbose --database=${{ matrix.databases }} --database-name=nextcloud --database-host=127.0.0.1 --database-port=$PGSQL_PORT --database-user=root --database-pass=rootpassword --admin-user admin --admin-pass password
php -S localhost:8080 &
- name: Enable app and app_api
- name: Enable app_api
run: ./occ app:enable -vvv -f app_api

- name: Setup python 3.11
uses: actions/setup-python@v5
with:
python-version: '3.11'
cache: 'pip'
cache-dependency-path: |
requirements.txt
- name: Install and init backend
- name: Install and start ex-app's server
env:
PYTHONUNBUFFERED: 1
APP_HOST: 0.0.0.0
Expand All @@ -121,20 +124,19 @@ jobs:
NEXTCLOUD_URL: http://localhost:8080
working-directory: ${{ env.APP_NAME }}
run: |
pip install -r requirements.txt
make download-a-few-models
pip install --no-deps -r requirements.txt
python3 lib/main.py &
- name: Register backend
run: |
./occ app_api:daemon:register --net host manual_install "Manual Install" manual-install http localhost http://localhost:8080
./occ app_api:app:register translate2 manual_install --json-info "{\"appid\":\"translate2\",\"name\":\"Local Machine Translation\",\"daemon_config_name\":\"manual_install\",\"version\":\"1.0.0\",\"secret\":\"12345\",\"port\":9081,\"scopes\":[\"AI_PROVIDERS\"],\"system_app\":0}" --force-scopes --wait-finish
- name: Scan files
- name: Test translation
run: |
curl --header "Content-Type: application/json" -X POST http://localhost:8080/ocs/v2.php/translation/translate --data '{"text":"Hallo Welt","fromLanguage":"de","toLanguage":"en"}'
curl --header "OCS-APIRequest: true" --header "Content-Type: application/json" -X POST http://localhost:8080/ocs/v2.php/translation/translate --data '{"text":"Hallo Welt","fromLanguage":"de","toLanguage":"en"}'
- name: Show log on failure
if: always()
run: |
tail data/nextcloud.log
tail data/nextcloud.log

0 comments on commit cb327f3

Please sign in to comment.