Skip to content

Commit

Permalink
Merge branch 'finos:master' into enumpushtosql
Browse files Browse the repository at this point in the history
  • Loading branch information
AFine-gs authored Nov 20, 2023
2 parents d720bff + b3837ac commit b7a67f6
Show file tree
Hide file tree
Showing 1,186 changed files with 26,111 additions and 9,242 deletions.
25 changes: 19 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ name: Build CI
env:
CI_DEPLOY_USERNAME: ${{ secrets.CI_DEPLOY_USERNAME }}
CI_DEPLOY_PASSWORD: ${{ secrets.CI_DEPLOY_PASSWORD }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
MAVEN_OPTS: "-Xmx6g"

on: [push, pull_request]
Expand All @@ -40,7 +39,19 @@ jobs:

steps:
- name: Checkout repo
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Cache Maven dependencies
uses: actions/cache@v3
env:
cache-name: cache-mvn-deps
with:
path: ~/.m2/repository
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Set up JDK
uses: actions/setup-java@v1
Expand Down Expand Up @@ -68,13 +79,12 @@ jobs:
with:
theme: dark

- name: Build + Test
- name: Build (PR)
if: github.ref != 'refs/heads/master'
run: |
mvn -B -e -DskipTests=true install
mvn -B -e surefire:test -DargLine="-XX:MaxRAMPercentage=70.0" -Dsurefire.reports.directory=${GITHUB_WORKSPACE}/surefire-reports-aggregate
- name: Build + Test + Maven Deploy + Sonar + Docker Snapshot
- name: Build (with Maven Deploy + Docker Snapshot)
if: github.ref == 'refs/heads/master'
env:
DOCKER_USERNAME: finos
Expand All @@ -86,7 +96,10 @@ jobs:
# and can cause problem with some code generators
# See https://github.com/finos/legend-engine/pull/924
run: |
mvn -B -e -DskipTests=true deploy -P docker-snapshot,sonar
mvn -B -e -DskipTests=true deploy -P docker-snapshot
- name: Test
run: |
mvn -B -e surefire:test -DargLine="-XX:MaxRAMPercentage=70.0" -Dsurefire.reports.directory=${GITHUB_WORKSPACE}/surefire-reports-aggregate
- name: Upload Test Results
Expand Down
74 changes: 74 additions & 0 deletions .github/workflows/code-quality.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
# Copyright 2022 Goldman Sachs
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

name: Code Quality Check

on: [workflow_dispatch]
# NOTE: currently, this is failing, we need further investigation to fix this build, for now, we will
# disable this code quality check to save resource
# push:
# branches:
# - master

env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
MAVEN_OPTS: "-Xmx6g"

# Cancel running jobs from previous pipelines of the same workflow on PR to save resource when commits are pushed quickly
# NOTE: we don't want this behavior on default branch
# See https://stackoverflow.com/a/68422069
concurrency:
group: ${{ github.ref == 'refs/heads/master' && format('ci-default-branch-{0}-{1}', github.sha, github.workflow) || format('ci-pr-{0}-{1}', github.ref, github.workflow) }}
cancel-in-progress: true

jobs:
sonar-code-check:
name: Sonar Code Quality Check
# NOTE: we cannot run this action in PR anyway because secrets are not accessible from forks
# See https://portal.productboard.com/sonarsource/1-sonarcloud/c/50-sonarcloud-analyzes-external-pull-request
# See https://community.sonarsource.com/t/github-action-ci-build-fail-with-set-the-sonar-token-env-variable/38997
if: github.repository == 'finos/legend-engine'
# NOTE: larger runner is required to run this build
runs-on: ubuntu-latest-4-cores

steps:
- name: Checkout repo
uses: actions/checkout@v4

- name: Cache Maven dependencies
uses: actions/cache@v3
env:
cache-name: cache-mvn-deps
with:
path: ~/.m2/repository
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Set up JDK
uses: actions/setup-java@v1
with:
java-version: 11

- name: Check Java version
run: java -version

- name: Download deps and plugins
run: mvn de.qaware.maven:go-offline-maven-plugin:resolve-dependencies

- name: Check Code Quality
run: |
mvn -B -e -DskipTests=true install -P sonar
4 changes: 2 additions & 2 deletions .github/workflows/release-large-runner.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ env:
CI_GPG_PASSPHRASE: ${{ secrets.CI_GPG_PASSPHRASE }}
DOCKER_USERNAME: finos
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
MAVEN_OPTS: -Xmx20g
MAVEN_OPTS: -Xmx10g

on:
workflow_dispatch:
Expand Down Expand Up @@ -72,4 +72,4 @@ jobs:
run: mvn -B -e release:prepare -Darguments='-B -e' -DpreparationGoals=clean -DreleaseVersion=${{ github.event.inputs.releaseVersion }} -DdevelopmentVersion=${{ env.DEVELOPMENT_VERSION }} -P release

- name: Perform release
run: mvn -B -e release:perform -Darguments='-B -e -T 2 -DargLine="-Xmx20g"' -P release,docker
run: mvn -B -e release:perform -Darguments='-B -e -T 4 -DargLine="-Xmx12g"' -P release,docker
2 changes: 2 additions & 0 deletions CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
/legend-engine-xts-analytics/** @finos/legend-engine-maintainers
/legend-engine-xts-authentication/** @finos/legend-engine-maintainers
/legend-engine-xts-avro/** @finos/legend-engine-maintainers
/legend-engine-xts-bigqueryFunction/** @finos/legend-engine-maintainers
/legend-engine-xts-changetoken/** @finos/legend-engine-maintainers
/legend-engine-xts-daml/** @finos/legend-engine-maintainers
/legend-engine-xts-data-push/** @finos/legend-engine-maintainers
Expand All @@ -33,6 +34,7 @@
/legend-engine-xts-service/** @finos/legend-engine-maintainers
/legend-engine-xts-serviceStore/** @finos/legend-engine-maintainers
/legend-engine-xts-snowflakeApp/** @finos/legend-engine-maintainers
/legend-engine-xts-hostedService/** @finos/legend-engine-maintainers
/legend-engine-xts-sql/** @finos/legend-engine-maintainers
/legend-engine-xts-text/** @finos/legend-engine-maintainers
/legend-engine-xts-xml/** @finos/legend-engine-maintainers
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit b7a67f6

Please sign in to comment.