From 998a0b6fe985fc32f260b6fb40c10a9a2010f0b6 Mon Sep 17 00:00:00 2001 From: Niklas van Schrick Date: Mon, 10 Nov 2025 20:45:36 +0100 Subject: [PATCH] Setup pipeline --- .github/workflows/ci.yml | 49 ++++++++++++++++++++++++++++++++++++++++ .gitlab-ci.yml | 30 ++++++++++++++++++++++++ 2 files changed, 79 insertions(+) create mode 100644 .github/workflows/ci.yml create mode 100644 .gitlab-ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..f3f1f7e --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,49 @@ +name: CI + +on: + push: + branches: + - main + pull_request: + +permissions: + pull-requests: write + +jobs: + pipeline: + runs-on: ubuntu-latest + steps: + - uses: Taucher2003/GitLab-Pipeline-Action@1.13.0 + name: Run pipeline + id: pipeline + with: + GL_SERVER_URL: https://gitlab.com + GL_PROJECT_ID: '75974852' + GL_RUNNER_TOKEN: ${{ secrets.GL_RUNNER_TOKEN }} + GL_API_TOKEN: ${{ secrets.GL_API_TOKEN }} + SHOW_JOB_LOGS: all + OVERRIDE_GITHUB_SHA: ${{ github.event_name == 'push' && github.sha || github.event.pull_request.head.sha }} + OVERRIDE_GITHUB_REF_NAME: ${{ github.event_name == 'push' && github.ref_name || github.event.pull_request.head.ref }} + env: + GLPA_C0_GH_REF: ${{ github.ref }} + GLPA_C0_GH_REF_NAME: ${{ github.ref_name }} + + - name: Find existing comment + uses: peter-evans/find-comment@v4 + id: find-comment + if: ${{ !cancelled() && github.event_name == 'pull_request' }} + with: + issue-number: ${{ github.event.pull_request.number }} + comment-author: 'github-actions[bot]' + body-includes: + + - name: Create or update comment + uses: peter-evans/create-or-update-comment@v5 + if: ${{ !cancelled() && github.event_name == 'pull_request' }} + with: + comment-id: ${{ steps.find-comment.outputs.comment-id }} + issue-number: ${{ github.event.pull_request.number }} + body: | + + ${{ steps.pipeline.outputs.SUMMARY_TEXT }} + edit-mode: replace diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..1568b35 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,30 @@ +stages: + - lint + - build + +.node: + image: node:24.8.0 + before_script: + - npm ci + +lint: + extends: + - .node + stage: lint + script: + - npm run lint + +build: + extends: + - .node + stage: build + parallel: + matrix: + - EDITION: + - ce + - ee + - cloud + script: + - '[[ $EDITION == "ce" ]] && rm -rf src/packages/{ee,cloud}' + - '[[ $EDITION == "ee" ]] && rm -rf src/packages/cloud' + - npm run build