mirror of
https://github.com/qlik-oss/nebula.js.git
synced 2026-05-24 16:00:16 -04:00
* fix(deps): update dependency webpack-cli to v7 (#1935) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * fix(deps): update minor and patch (#1934) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * chore: re-run spec (#1938) * Potential fix for code scanning alert no. 98: Overly permissive regular expression range (#1936) Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> * fix: align requirements better with client (#1937) * fix: aline requirements better with client * fix: remove comment * chore: fix for empty dims * fix: prototype pollution vulnerabilities in json-patch.js (#1941) * Initial plan * Fix prototype pollution security vulnerabilities in json-patch.js Co-authored-by: Caele <6318307+Caele@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: Caele <6318307+Caele@users.noreply.github.com> * chore: normalize yarn resolutions for renovate compatibility (#1943) * chore: avoid renovate resolution lookup warnings * chore: dedupe yarn resolutions and normalize ranges Signed-off-by: Johan Enell <johan.enell@qlik.com> --------- Signed-off-by: Johan Enell <johan.enell@qlik.com> * fix(deps): update dependency puppeteer to v24.40.0 (#1947) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * chore(deps): update material-ui monorepo to v7 * chore: perfrom mui v7 migration * chore: store test results * chore: adjust artifact storage * chore: fix lint * chore: fix report folder * chore: fix classnames --------- Signed-off-by: Johan Enell <johan.enell@qlik.com> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Tobias Åström <tsm@qlik.com> Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com> Co-authored-by: Caele <6318307+Caele@users.noreply.github.com> Co-authored-by: Johan Enell <johan.enell@qlik.com>
258 lines
8.1 KiB
YAML
258 lines
8.1 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
tags: ['v*']
|
|
pull_request:
|
|
|
|
env:
|
|
JEST_JUNIT_OUTPUT_DIR: ./coverage/junit/
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
- name: Enable Corepack
|
|
run: corepack enable
|
|
- uses: actions/setup-node@v6
|
|
with:
|
|
node-version: 24.14.0
|
|
cache: 'yarn'
|
|
- name: Install dependencies
|
|
run: yarn install --immutable
|
|
- name: Build
|
|
run: yarn run build
|
|
- name: Upload workspace
|
|
uses: actions/upload-artifact@v7
|
|
with:
|
|
name: workspace
|
|
path: .
|
|
retention-days: 1
|
|
|
|
validate:
|
|
runs-on: ubuntu-latest
|
|
needs: build
|
|
permissions:
|
|
contents: read
|
|
checks: write
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
- name: Enable Corepack
|
|
run: corepack enable
|
|
- uses: actions/setup-node@v6
|
|
with:
|
|
node-version: 24.14.0
|
|
cache: 'yarn'
|
|
- name: Download workspace
|
|
uses: actions/download-artifact@v8
|
|
with:
|
|
name: workspace
|
|
path: .
|
|
- name: Install dependencies
|
|
run: yarn install --immutable
|
|
- name: Locale verify
|
|
run: yarn run locale:verify
|
|
- name: Lint
|
|
run: yarn run lint
|
|
- name: Run unit tests and publish to codeclimate
|
|
env:
|
|
JEST_JUNIT_OUTPUT_DIR: ./coverage/junit/
|
|
run: yarn test:unit --coverage
|
|
- name: Store junit results
|
|
if: always()
|
|
uses: actions/upload-artifact@v7
|
|
with:
|
|
name: junit
|
|
path: coverage/junit
|
|
- name: Publish junit test report
|
|
if: ${{ always() && hashFiles('coverage/junit/*.xml') != '' }}
|
|
uses: dorny/test-reporter@v2
|
|
with:
|
|
name: Unit Tests
|
|
path: coverage/junit/*.xml
|
|
reporter: jest-junit
|
|
fail-on-error: false
|
|
|
|
test-integration:
|
|
runs-on: ubuntu-latest
|
|
needs: build
|
|
permissions:
|
|
contents: read
|
|
checks: write
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
- name: Enable Corepack
|
|
run: corepack enable
|
|
- uses: actions/setup-node@v6
|
|
with:
|
|
node-version: 24.14.0
|
|
cache: 'yarn'
|
|
- name: Download workspace
|
|
uses: actions/download-artifact@v8
|
|
with:
|
|
name: workspace
|
|
path: .
|
|
- name: Install dependencies
|
|
run: yarn install --immutable
|
|
- name: Install Playwright Browsers
|
|
run: npx playwright install --with-deps
|
|
- name: Test component
|
|
env:
|
|
PLAYWRIGHT_JUNIT_OUTPUT_NAME: component-junit.xml
|
|
run: yarn run test:component
|
|
- name: Publish component test report
|
|
if: ${{ always() && hashFiles('test-results/component-junit.xml') != '' }}
|
|
uses: dorny/test-reporter@v2
|
|
with:
|
|
name: Component Tests
|
|
path: test-results/component-junit.xml
|
|
reporter: jest-junit
|
|
fail-on-error: false
|
|
- name: Test mashup
|
|
run: yarn run test:mashup
|
|
- name: Store mashup artifacts
|
|
if: always()
|
|
uses: actions/upload-artifact@v7
|
|
with:
|
|
name: mashup
|
|
path: ./test/mashup
|
|
- name: Publish mashup test report
|
|
if: ${{ always() && hashFiles('test/mashup/reports/xml/*.xml') != '' }}
|
|
uses: dorny/test-reporter@v2
|
|
with:
|
|
name: Mashup Tests
|
|
path: test/mashup/reports/xml/*.xml
|
|
reporter: jest-junit
|
|
fail-on-error: false
|
|
- name: Test integration
|
|
env:
|
|
PLAYWRIGHT_JUNIT_OUTPUT_NAME: integration-junit.xml
|
|
run: yarn run test:integration
|
|
- name: Publish integration test report
|
|
if: ${{ always() && hashFiles('test-results/integration-junit.xml') != '' }}
|
|
uses: dorny/test-reporter@v2
|
|
with:
|
|
name: Integration Tests
|
|
path: test-results/integration-junit.xml
|
|
reporter: jest-junit
|
|
fail-on-error: false
|
|
- name: Test rendering
|
|
run: yarn run test:rendering
|
|
- name: Store rendering artifacts
|
|
if: always()
|
|
uses: actions/upload-artifact@v7
|
|
with:
|
|
name: rendering
|
|
path: ./test/rendering
|
|
- name: Publish rendering test report
|
|
if: ${{ always() && hashFiles('test/rendering/reports/xml/*.xml') != '' }}
|
|
uses: dorny/test-reporter@v2
|
|
with:
|
|
name: Rendering Tests
|
|
path: test/rendering/reports/xml/*.xml
|
|
reporter: jest-junit
|
|
fail-on-error: false
|
|
|
|
test-create:
|
|
runs-on: ubuntu-latest
|
|
needs: build
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
- name: Enable Corepack
|
|
run: corepack enable
|
|
- uses: actions/setup-node@v6
|
|
with:
|
|
node-version: 24.14.0
|
|
cache: 'yarn'
|
|
- name: Download workspace
|
|
uses: actions/download-artifact@v8
|
|
with:
|
|
name: workspace
|
|
path: .
|
|
- name: Install dependencies
|
|
run: yarn install --immutable
|
|
- name: Install Playwright Chromium
|
|
run: npx playwright install chromium --with-deps
|
|
- run: chmod +x .github/scripts/nebula_create.sh
|
|
- name: Create Nebula visualization project (Picasso)
|
|
run: .github/scripts/nebula_create.sh generated/hello none false false true true
|
|
- name: Create Nebula visualization project (Barchart)
|
|
run: .github/scripts/nebula_create.sh generated/barchart barchart false false true true
|
|
- name: Create Nebula mashup project
|
|
run: .github/scripts/nebula_create.sh generated/hello-mashup none true true true false
|
|
- name: Store barchart screenshots
|
|
if: always()
|
|
uses: actions/upload-artifact@v7
|
|
with:
|
|
name: barchart-screenshots
|
|
path: generated/barchart/screenshots
|
|
- name: Store mashup artifacts
|
|
if: always()
|
|
uses: actions/upload-artifact@v7
|
|
with:
|
|
name: mashup-artifacts
|
|
path: test/mashup/__artifacts__
|
|
|
|
api-governance:
|
|
runs-on: ubuntu-latest
|
|
defaults:
|
|
run:
|
|
working-directory: .
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v6
|
|
with:
|
|
fetch-depth: 0
|
|
- name: Enable Corepack
|
|
run: corepack enable
|
|
- name: Set up Node.js
|
|
uses: actions/setup-node@v6
|
|
with:
|
|
node-version: 24.14.0
|
|
cache: 'yarn'
|
|
|
|
- name: Install dependencies
|
|
run: yarn install --immutable
|
|
|
|
- name: Create version.txt
|
|
id: version
|
|
run: |
|
|
set -x
|
|
if [ "${GITHUB_REF_TYPE}" = "tag" ]; then
|
|
version=${GITHUB_REF_NAME#v}
|
|
else
|
|
yarn workspace "@nebula.js/stardust" version preminor
|
|
yarn spec
|
|
version=$(node -p "require('./apis/stardust/api-spec/spec.json').info.version")
|
|
fi
|
|
echo "$version" > ./version.txt
|
|
echo "version=$version" >> $GITHUB_OUTPUT
|
|
echo "Building $version"
|
|
|
|
- name: Prepare API Compliance
|
|
run: |
|
|
docker pull ghcr.io/qlik-download/api-compliance
|
|
docker create -v /specs --name specs alpine:3.4 /bin/true
|
|
docker cp ./apis/stardust/api-spec/spec.json specs:/specs
|
|
docker cp ./apis/stardust/api-spec/listbox-spec.json specs:/specs
|
|
|
|
- name: Run API Compliance
|
|
env:
|
|
CREDENTIALS_S3_SECRETKEY: ${{ secrets.APICULTURIST_S3 }}
|
|
CREDENTIALS_GITHUB: ${{ secrets.APICULTURIST_GITHUB }}
|
|
CREDENTIALS_COLONY: ${{ secrets.APICULTURIST_TOKEN }}
|
|
COMMIT_SHA: ${{ github.sha }}
|
|
VER: v${{ steps.version.outputs.version }}
|
|
run: |
|
|
docker run --volumes-from specs \
|
|
-e SPEC_PATHS="abdc47c2-921a-45d3-ba5c-80d448574c5b@/specs/spec.json,ba0bcf91-d7a6-4048-a36a-ad9a2dc8c03e@/specs/listbox-spec.json" \
|
|
-e COMMIT_SHA="$COMMIT_SHA" \
|
|
-e RELEASE_TAG="$VER" \
|
|
-e PRE_RELEASE="true" \
|
|
-e CREDENTIALS_S3_SECRETKEY="$CREDENTIALS_S3_SECRETKEY" \
|
|
-e CREDENTIALS_GITHUB="$CREDENTIALS_GITHUB" \
|
|
-e CREDENTIALS_COLONY="$CREDENTIALS_COLONY" \
|
|
ghcr.io/qlik-download/api-compliance
|