diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml deleted file mode 100644 index 475a3e7..0000000 --- a/.github/workflows/test.yml +++ /dev/null @@ -1,30 +0,0 @@ -name: test - -on: - pull_request: - branches-ignore: - - none - -jobs: - build-and-test: - name: Build and test - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - version: - - '18.18' - - '22.20' - - '24.10' - steps: - - name: Checkout code - uses: actions/checkout@v5 - - - name: Install Node.js v${{ matrix.version }} - uses: actions/setup-node@v5 - with: - node-version: ${{ matrix.version }} - - - run: npm ci - - run: npm run lint - - run: npm run test diff --git a/.github/workflows/update-license-year.yml b/.github/workflows/update-license-year.yml deleted file mode 100644 index 2cc58da..0000000 --- a/.github/workflows/update-license-year.yml +++ /dev/null @@ -1,45 +0,0 @@ -name: Update License Year - -on: - schedule: - - cron: "0 3 1 1 *" # 03:00 AM on January 1 - -permissions: - contents: write - pull-requests: write - -jobs: - test: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v5 - with: - fetch-depth: 0 - - - name: Set Current year - run: "echo CURRENT=$(date +%Y) >> $GITHUB_ENV" - - - name: Set Previous Year - run: "echo PREVIOUS=$(($CURRENT-1)) >> $GITHUB_ENV" - - - name: Update LICENSE - uses: jacobtomlinson/gha-find-replace@v3 - with: - find: ${{ env.PREVIOUS }} - replace: ${{ env.CURRENT }} - include: "LICENSE" - regex: false - - - name: Commit files - run: | - git config user.name 'github-actions[bot]' - git config user.email 'github-actions[bot]@users.noreply.github.com' - git commit -m "Updated License Year" -a - - - name: Create Pull Request - uses: peter-evans/create-pull-request@v8 - with: - token: ${{ secrets.GITHUB_TOKEN }} - title: Update License Year - branch: update-license diff --git a/.harness/orgs/PROD/projects/Harness_Split/pipelines/FMEsplitevaluator/input_sets/Default.yaml b/.harness/orgs/PROD/projects/Harness_Split/pipelines/FMEsplitevaluator/input_sets/Default.yaml new file mode 100644 index 0000000..270b462 --- /dev/null +++ b/.harness/orgs/PROD/projects/Harness_Split/pipelines/FMEsplitevaluator/input_sets/Default.yaml @@ -0,0 +1,15 @@ +inputSet: + name: DefaultInput + tags: {} + identifier: Default + orgIdentifier: PROD + projectIdentifier: Harness_Split + pipeline: + identifier: FMEsplitevaluator + properties: + ci: + codebase: + build: + type: branch + spec: + branch: <+input> diff --git a/.harness/test.yaml b/.harness/test.yaml new file mode 100644 index 0000000..f6de830 --- /dev/null +++ b/.harness/test.yaml @@ -0,0 +1,85 @@ +pipeline: + name: FME-split-evaluator + identifier: FMEsplitevaluator + projectIdentifier: Harness_Split + orgIdentifier: PROD + properties: + ci: + codebase: + connectorRef: splitio + repoName: split-evaluator + build: + type: branch + spec: + branch: <+input> + variables: + - name: nodeVersions + type: String + value: 18.18,22.20,24.10 + stages: + - stage: + name: Build and Test + identifier: build_and_test + type: CI + spec: + cloneCodebase: true + runtime: + type: Cloud + spec: + size: small + platform: + os: Linux + arch: Amd64 + execution: + steps: + - step: + identifier: setup_node + name: Setup NodeJS + type: Run + spec: + connectorRef: account.harnessImage + image: ubuntu:22.04 + shell: Bash + command: | + echo "Installing Node.js version <+matrix.nodeVersion>" + apt-get update + apt-get install -y curl + curl -fsSL https://deb.nodesource.com/setup_<+matrix.nodeVersion>.x | bash - + apt-get install -y nodejs npm + envVariables: + NODE_VERSION: <+matrix.nodeVersion> + strategy: + matrix: + nodeVersion: <+pipeline.variables.nodeVersions.split(",")> + timeout: 10m + - step: + type: Run + name: Install NPM Dependencies + identifier: run_npm_ci + spec: + shell: Bash + command: | + npm ci + timeout: 10m + - step: + type: Run + name: NPM Lint + identifier: run_npm_lint + spec: + shell: Bash + command: | + npm run lint + timeout: 10m + - step: + type: Run + name: Test + identifier: run_npm_test + spec: + connectorRef: account.harnessImage + image: ubuntu:24.04 + shell: Bash + command: | + apt-get update + apt-get install -y nodejs npm + npm test + timeout: 10m