Skip to content
Snippets Groups Projects
Unverified Commit 3b79aa2a authored by Vamsi Peri's avatar Vamsi Peri Committed by GitHub
Browse files

Cloverage on master (#33398)


* Run Cloverage job only on merge to `master`

* Use shorter `github.ref_name`

* [Reopened] Run Cloverage job only on merge to master

---------

Co-authored-by: default avatarNemanja <31325167+nemanjaglumac@users.noreply.github.com>
parent 4b27f570
Branches
Tags
No related merge requests found
......@@ -3,8 +3,8 @@ name: Backend
on:
push:
branches:
- 'master'
- 'release-**'
- "master"
- "release-**"
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
......@@ -33,24 +33,24 @@ jobs:
be-linter-cloverage:
needs: files-changed
if: github.event.pull_request.draft == false && needs.files-changed.outputs.backend_all == 'true'
if: github.ref_name == 'master' && needs.files-changed.outputs.backend_all == 'true'
runs-on: ubuntu-22.04
timeout-minutes: 90
steps:
- uses: actions/checkout@v3
- name: Prepare back-end environment
uses: ./.github/actions/prepare-backend
with:
m2-cache-key: 'cloverage'
- name: Build static viz frontend
run: yarn build-static-viz
- name: Collect the test coverage
run: clojure -X:dev:ci:ee:ee-dev:test:cloverage
- name: Upload coverage to codecov.io
uses: codecov/codecov-action@v3
with:
files: ./target/coverage/codecov.json
flags: back-end
- uses: actions/checkout@v3
- name: Prepare back-end environment
uses: ./.github/actions/prepare-backend
with:
m2-cache-key: "cloverage"
- name: Build static viz frontend
run: yarn build-static-viz
- name: Collect the test coverage
run: clojure -X:dev:ci:ee:ee-dev:test:cloverage
- name: Upload coverage to codecov.io
uses: codecov/codecov-action@v3
with:
files: ./target/coverage/codecov.json
flags: back-end
be-linter-clj-kondo:
needs: files-changed
......@@ -60,57 +60,55 @@ jobs:
env:
DOWNLOAD_URL: https://github.com/clj-kondo/clj-kondo/releases/download
steps:
- uses: actions/checkout@v3
- name: Install clj-kondo
run: |
curl -OL ${DOWNLOAD_URL}/v${CLJ_KONDO_VERSION}/clj-kondo-${CLJ_KONDO_VERSION}-linux-static-amd64.zip
curl -OL ${DOWNLOAD_URL}/v${CLJ_KONDO_VERSION}/clj-kondo-${CLJ_KONDO_VERSION}-linux-static-amd64.zip.sha256
cat clj-kondo-${CLJ_KONDO_VERSION}-linux-static-amd64.zip.sha256 >> SHA256sum.txt
echo " clj-kondo-${CLJ_KONDO_VERSION}-linux-static-amd64.zip" >> SHA256sum.txt
sha256sum -c SHA256sum.txt
unzip clj-kondo-${CLJ_KONDO_VERSION}-linux-static-amd64.zip
- run: ./clj-kondo --version
- name: Run clj-kondo
run: >-
./clj-kondo
--config ./.clj-kondo/config.edn
--config-dir ./.clj-kondo
--parallel
--lint
./src
./test
./enterprise/backend/src
./enterprise/backend/test
./shared/src
./shared/test
./modules/drivers/athena/src
./modules/drivers/athena/test
./modules/drivers/bigquery-cloud-sdk/src
./modules/drivers/bigquery-cloud-sdk/test
./modules/drivers/druid/src
./modules/drivers/druid/test
./modules/drivers/googleanalytics/src
./modules/drivers/googleanalytics/test
./modules/drivers/mongo/src
./modules/drivers/mongo/test
./modules/drivers/oracle/src
./modules/drivers/oracle/test
./modules/drivers/presto-jdbc/src
./modules/drivers/presto-jdbc/test
./modules/drivers/redshift/src
./modules/drivers/redshift/test
./modules/drivers/snowflake/src
./modules/drivers/snowflake/test
./modules/drivers/sparksql/src
./modules/drivers/sparksql/test
./modules/drivers/sqlite/src
./modules/drivers/sqlite/test
./modules/drivers/sqlserver/src
./modules/drivers/sqlserver/test
./modules/drivers/vertica/src
./modules/drivers/vertica/test
- uses: actions/checkout@v3
- name: Install clj-kondo
run: |
curl -OL ${DOWNLOAD_URL}/v${CLJ_KONDO_VERSION}/clj-kondo-${CLJ_KONDO_VERSION}-linux-static-amd64.zip
curl -OL ${DOWNLOAD_URL}/v${CLJ_KONDO_VERSION}/clj-kondo-${CLJ_KONDO_VERSION}-linux-static-amd64.zip.sha256
cat clj-kondo-${CLJ_KONDO_VERSION}-linux-static-amd64.zip.sha256 >> SHA256sum.txt
echo " clj-kondo-${CLJ_KONDO_VERSION}-linux-static-amd64.zip" >> SHA256sum.txt
sha256sum -c SHA256sum.txt
unzip clj-kondo-${CLJ_KONDO_VERSION}-linux-static-amd64.zip
- run: ./clj-kondo --version
- name: Run clj-kondo
run: >-
./clj-kondo
--config ./.clj-kondo/config.edn
--config-dir ./.clj-kondo
--parallel
--lint
./src
./test
./enterprise/backend/src
./enterprise/backend/test
./shared/src
./shared/test
./modules/drivers/athena/src
./modules/drivers/athena/test
./modules/drivers/bigquery-cloud-sdk/src
./modules/drivers/bigquery-cloud-sdk/test
./modules/drivers/druid/src
./modules/drivers/druid/test
./modules/drivers/googleanalytics/src
./modules/drivers/googleanalytics/test
./modules/drivers/mongo/src
./modules/drivers/mongo/test
./modules/drivers/oracle/src
./modules/drivers/oracle/test
./modules/drivers/presto-jdbc/src
./modules/drivers/presto-jdbc/test
./modules/drivers/redshift/src
./modules/drivers/redshift/test
./modules/drivers/snowflake/src
./modules/drivers/snowflake/test
./modules/drivers/sparksql/src
./modules/drivers/sparksql/test
./modules/drivers/sqlite/src
./modules/drivers/sqlite/test
./modules/drivers/sqlserver/src
./modules/drivers/sqlserver/test
./modules/drivers/vertica/src
./modules/drivers/vertica/test
be-linter-eastwood:
needs: files-changed
......@@ -118,13 +116,13 @@ jobs:
runs-on: ubuntu-22.04
timeout-minutes: 20
steps:
- uses: actions/checkout@v3
- name: Prepare back-end environment
uses: ./.github/actions/prepare-backend
with:
m2-cache-key: 'eastwood'
- run: clojure -X:dev:ee:ee-dev:drivers:drivers-dev:test:eastwood
name: Run Eastwood linter
- uses: actions/checkout@v3
- name: Prepare back-end environment
uses: ./.github/actions/prepare-backend
with:
m2-cache-key: "eastwood"
- run: clojure -X:dev:ee:ee-dev:drivers:drivers-dev:test:eastwood
name: Run Eastwood linter
# Because it's not possible to conditionally run only `java-11-ee` test in the draft mode,
# we have to extract that job manually here. Backend developers have requested that this
......@@ -136,31 +134,31 @@ jobs:
name: be-tests-java-11-ee-pre-check
timeout-minutes: 60
steps:
- uses: actions/checkout@v3
- name: Prepare front-end environment
uses: ./.github/actions/prepare-frontend
- name: Prepare back-end environment
uses: ./.github/actions/prepare-backend
with:
m2-cache-key: java-11-ee-pre-check
- run: yarn install --frozen-lockfile --prefer-offline
- name: Build static viz frontend
run: yarn build-static-viz
- name: Run tests
run: clojure -X:dev:ci:test:ee:ee-dev
- name: Publish Test Report (JUnit)
uses: dorny/test-reporter@v1
if: failure()
with:
path: 'target/junit/**/*_test.xml'
name: JUnit Test Report be-tests-java-11-ee-pre-check
reporter: java-junit
list-suites: failed
list-tests: failed
fail-on-error: false
- uses: actions/checkout@v3
- name: Prepare front-end environment
uses: ./.github/actions/prepare-frontend
- name: Prepare back-end environment
uses: ./.github/actions/prepare-backend
with:
m2-cache-key: java-11-ee-pre-check
- run: yarn install --frozen-lockfile --prefer-offline
- name: Build static viz frontend
run: yarn build-static-viz
- name: Run tests
run: clojure -X:dev:ci:test:ee:ee-dev
- name: Publish Test Report (JUnit)
uses: dorny/test-reporter@v1
if: failure()
with:
path: "target/junit/**/*_test.xml"
name: JUnit Test Report be-tests-java-11-ee-pre-check
reporter: java-junit
list-suites: failed
list-tests: failed
fail-on-error: false
be-tests:
needs: files-changed
......@@ -174,31 +172,31 @@ jobs:
edition: [oss, ee]
java-version: [11, 17]
steps:
- uses: actions/checkout@v3
- name: Prepare front-end environment
uses: ./.github/actions/prepare-frontend
- name: Prepare back-end environment
uses: ./.github/actions/prepare-backend
with:
m2-cache-key: be-tests
- run: yarn install --frozen-lockfile --prefer-offline
- name: Build static viz frontend
run: yarn build-static-viz
- name: Run tests
run: clojure -X:dev:ci:test:${{ matrix.edition }}:${{ matrix.edition }}-dev
- name: Publish Test Report (JUnit)
uses: dorny/test-reporter@v1
if: failure()
with:
path: 'target/junit/**/*_test.xml'
name: JUnit Test Report be-tests-java-${{ matrix.java-version }}-${{ matrix.edition }}
reporter: java-junit
list-suites: failed
list-tests: failed
fail-on-error: false
- uses: actions/checkout@v3
- name: Prepare front-end environment
uses: ./.github/actions/prepare-frontend
- name: Prepare back-end environment
uses: ./.github/actions/prepare-backend
with:
m2-cache-key: be-tests
- run: yarn install --frozen-lockfile --prefer-offline
- name: Build static viz frontend
run: yarn build-static-viz
- name: Run tests
run: clojure -X:dev:ci:test:${{ matrix.edition }}:${{ matrix.edition }}-dev
- name: Publish Test Report (JUnit)
uses: dorny/test-reporter@v1
if: failure()
with:
path: "target/junit/**/*_test.xml"
name: JUnit Test Report be-tests-java-${{ matrix.java-version }}-${{ matrix.edition }}
reporter: java-junit
list-suites: failed
list-tests: failed
fail-on-error: false
be-tests-stub:
needs: files-changed
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment