Skip to content

ci: setup e2e ci pipeline #10

ci: setup e2e ci pipeline

ci: setup e2e ci pipeline #10

Workflow file for this run

name: lint-build-e2e
on:
push:
branches:
- main
pull_request:
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: serve-extension
run: |
docker run -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: 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=host.docker.internal="$host_ip" owncloudci/wait-for -it host.docker.internal:8443 -t 10
# e2e:
# runs-on: ubuntu-latest
# container: node:18
# services:
# extension:
# image: nginx:1.25.3
# volumes:
# - ${{ github.workspace }}/tests/e2e/ci/nginx.conf:/etc/nginx/conf.d/default.conf:ro
# - ${{ github.workspace }}/dist:/usr/share/nginx/html:ro
# ocis:
# image: owncloud/ocis:5.0.0
# env:
# OCIS_URL: https://ocis:9200
# OCIS_INSECURE: true
# OCIS_LOG_LEVEL: error
# WEB_UI_CONFIG_FILE: /web/config.json
# IDM_ADMIN_PASSWORD: admin
# PROXY_ENABLE_BASIC_AUTH: true
# volumes:
# - ${{ github.workspace }}/tests/e2e/ci/web.config.json:/web/config.json:ro
# 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: build
# run: pwd && ls && pnpm build
# - name: install-chromium
# run: npx playwright install chromium
# - name: e2e
# run: sleep 5 && pnpm test:e2e tests/e2e/features/**/*.feature
# env:
# OCIS_URL: https://ocis:9200