Skip to content

refactor: Rename param.value to param.input for clarity and consistency #1418

refactor: Rename param.value to param.input for clarity and consistency

refactor: Rename param.value to param.input for clarity and consistency #1418

Workflow file for this run

name: Test CI
on: [push, pull_request]
jobs:
build-artifact:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: '18.x'
registry-url: 'https://registry.npmjs.org'
- name: Restore node_modules
uses: actions/cache/restore@v4
id: restore-node-modules
with:
path: |
node_modules
packages/**/node_modules
!node_modules/@data-story
!packages/*/node_modules/@data-story
!**/node_modules/.cache
!**/node_modules/**/node_modules
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-modules-
- name: Restore Cypress cache
uses: actions/cache/restore@v4
id: restore-cypress-cache
with:
path: /home/runner/.cache/Cypress
key: ${{ runner.os }}-cypress-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-cypress-
# Install dependencies (only when cache is not hit)
- name: Install dependencies
if: |
steps.restore-node-modules.outputs.cache-hit != 'true'
run: yarn install --immutable
- name: cypress install
if: |
steps.restore-cypress-cache.outputs.cache-hit != 'true'
run: yarn cypress install
- name: yarn build
run: yarn build
- name: Upload build dist artifacts
uses: actions/upload-artifact@v4
with:
name: dist-artifacts
path: |
packages/core/dist
packages/ui/dist
packages/nodejs/dist
packages/hubspot/dist
packages/ds-ext/dist
packages/docs/dist
retention-days: 1
# Save node_modules (always execute)
- name: Save node_modules
if: success()
uses: actions/cache/save@v4
with:
path: |
node_modules
packages/**/node_modules
!node_modules/@data-story
!packages/*/node_modules/@data-story
!**/node_modules/.cache
!**/node_modules/**/node_modules
key: ${{ steps.restore-node-modules.outputs.cache-primary-key }}
# Save Cypress cache (always execute)
- name: Save Cypress cache
if: success()
uses: actions/cache/save@v4
with:
path: /home/runner/.cache/Cypress
key: ${{ steps.restore-cypress-cache.outputs.cache-primary-key }}
- name: Cleanup
if: always()
run: yarn cache clean
unit-test:
needs: build-artifact
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: '18.x'
registry-url: 'https://registry.npmjs.org'
- name: Restore node_modules
uses: actions/cache/restore@v4
id: restore-node-modules
with:
path: |
node_modules
packages/**/node_modules
!node_modules/@data-story
!packages/*/node_modules/@data-story
!**/node_modules/.cache
!**/node_modules/**/node_modules
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-modules-
- name: Restore Cypress cache
uses: actions/cache/restore@v4
id: restore-cypress-cache
with:
path: /home/runner/.cache/Cypress
key: ${{ runner.os }}-cypress-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-cypress-
- name: Download dist artifacts
uses: actions/download-artifact@v4
with:
name: dist-artifacts
path: packages
- name: Run @data-story/core, @data-story/ui, @data-story/docs tests
run: yarn run ci:test-packages
e2e-test:
needs: build-artifact
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: '18.x'
registry-url: 'https://registry.npmjs.org'
- name: Restore node_modules
uses: actions/cache/restore@v4
id: restore-node-modules
with:
path: |
node_modules
packages/**/node_modules
!node_modules/@data-story
!packages/*/node_modules/@data-story
!**/node_modules/.cache
!**/node_modules/**/node_modules
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-modules-
- name: Restore Cypress cache
uses: actions/cache/restore@v4
id: restore-cypress-cache
with:
path: /home/runner/.cache/Cypress
key: ${{ runner.os }}-cypress-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-cypress-
- name: Download build artifacts
uses: actions/download-artifact@v4
with:
name: dist-artifacts
path: packages
- name: Run e2e tests
run: yarn run ci:e2e