-
-
Notifications
You must be signed in to change notification settings - Fork 1
78 lines (65 loc) · 2.11 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
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 \
-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