-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* refactor: move package.json into e2e * ci: setup e2e in github action ci: add ocis service ci: run in headless ci: fix server urls
- Loading branch information
Showing
6 changed files
with
150 additions
and
26 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
name: lint-build-e2e | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
|
||
env: | ||
OCIS_URL: https://localhost:9200 | ||
|
||
jobs: | ||
ci: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: pnpm-install | ||
uses: pnpm/action-setup@v3 | ||
with: | ||
run_install: | | ||
- args: [--frozen-lockfile, --strict-peer-dependencies] | ||
- name: lint | ||
run: pnpm lint | ||
|
||
- name: build | ||
run: pnpm build | ||
|
||
- name: generate-ssl-certs | ||
run: | | ||
openssl req -x509 -nodes -days 365 -newkey rsa:2048 \ | ||
-keyout ${{ github.workspace }}/tests/e2e/ci/nginx/nginx-ssl.key \ | ||
-out ${{ github.workspace }}/tests/e2e/ci/nginx/nginx-ssl.crt \ | ||
-subj "/CN=localhost" | ||
- name: extension-server | ||
run: | | ||
docker run --rm -d \ | ||
-p 8443:443 \ | ||
-v ${{ github.workspace }}/tests/e2e/ci/nginx:/etc/nginx/conf.d \ | ||
-v ${{ github.workspace }}/dist:/usr/share/nginx/html \ | ||
nginx:1.25.3 | ||
- name: ocis-server | ||
run: | | ||
docker run --rm -d \ | ||
-p 9200:9200 \ | ||
-e OCIS_URL=$OCIS_URL \ | ||
-e OCIS_INSECURE=true \ | ||
-e OCIS_LOG_LEVEL=error \ | ||
-e WEB_UI_CONFIG_FILE=/web/config.json \ | ||
-e IDM_ADMIN_PASSWORD=admin \ | ||
-e PROXY_ENABLE_BASIC_AUTH=true \ | ||
-v ${{ github.workspace }}/tests/e2e/ci/web.config.json:/web/config.json:ro \ | ||
--entrypoint sh \ | ||
owncloud/ocis:5.0.0 \ | ||
-c 'ocis init || true && ocis server' | ||
- name: host-ip | ||
id: host_ip | ||
run: echo "host_ip=$(hostname -I | cut -d' ' -f1)" >> "$GITHUB_OUTPUT" | ||
|
||
- name: wait-services | ||
run: | | ||
docker run --rm \ | ||
--add-host dockerhost:${{ steps.host_ip.outputs.host_ip }} \ | ||
owncloudci/wait-for \ | ||
-it dockerhost:8443,dockerhost:9200 -t 10 | ||
- name: install-chromium | ||
run: npx playwright install chromium | ||
|
||
- name: e2e | ||
run: pnpm test:e2e tests/e2e/features/**/*.feature | ||
env: | ||
HEADLESS: true |
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
server { | ||
listen 443 ssl; | ||
server_name localhost; | ||
|
||
ssl_certificate /etc/nginx/conf.d/nginx-ssl.crt; | ||
ssl_certificate_key /etc/nginx/conf.d/nginx-ssl.key; | ||
|
||
location / { | ||
add_header 'Access-Control-Allow-Origin' '*'; | ||
} | ||
|
||
root /usr/share/nginx/html; | ||
index index.html index.htm; | ||
try_files $uri $uri/ /index.html; | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
{ | ||
"server": "https://localhost:9200", | ||
"theme": "https://localhost:9200/themes/owncloud/theme.json", | ||
"openIdConnect": { | ||
"metadata_url": "https://localhost:9200/.well-known/openid-configuration", | ||
"authority": "https://localhost:9200", | ||
"client_id": "web", | ||
"response_type": "code", | ||
"scope": "openid profile email" | ||
}, | ||
"options": { | ||
"topCenterNotifications": true, | ||
"disablePreviews": true, | ||
"displayResourcesLazy": false, | ||
"sidebar": { | ||
"shares": { | ||
"showAllOnLoad": true | ||
} | ||
}, | ||
"previewFileMimeTypes": [ | ||
"image/gif", | ||
"image/png", | ||
"image/jpeg", | ||
"text/plain", | ||
"image/tiff", | ||
"image/bmp", | ||
"image/x-ms-bmp" | ||
], | ||
"contextHelpersReadMore": true | ||
}, | ||
"apps": [ | ||
"files", | ||
"text-editor", | ||
"pdf-viewer", | ||
"search", | ||
"external", | ||
"admin-settings", | ||
"ocm", | ||
"webfinger" | ||
], | ||
"external_apps": [ | ||
{ | ||
"id": "preview", | ||
"path": "web-app-preview", | ||
"config": { | ||
"mimeTypes": ["image/tiff", "image/bmp", "image/x-ms-bmp"] | ||
} | ||
}, | ||
{ | ||
"id": "presentation-viewer", | ||
"path": "https://localhost:8443/com.github.jankaritech.web.mdpresentation/extension.js" | ||
} | ||
] | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"type": "commonjs" | ||
} |
This file was deleted.
Oops, something went wrong.