|
| 1 | +# Licensed to the Apache Software Foundation (ASF) under one |
| 2 | +# or more contributor license agreements. See the NOTICE file |
| 3 | +# distributed with this work for additional information |
| 4 | +# regarding copyright ownership. The ASF licenses this file |
| 5 | +# to you under the Apache License, Version 2.0 (the |
| 6 | +# "License"); you may not use this file except in compliance |
| 7 | +# with the License. You may obtain a copy of the License at |
| 8 | +# |
| 9 | +# http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | +# |
| 11 | +# Unless required by applicable law or agreed to in writing, |
| 12 | +# software distributed under the License is distributed on an |
| 13 | +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| 14 | +# KIND, either express or implied. See the License for the |
| 15 | +# specific language governing permissions and limitations |
| 16 | +# under the License. |
| 17 | + |
| 18 | +name: CodeCov Check |
| 19 | + |
| 20 | +on: [pull_request_target] |
| 21 | + |
| 22 | +jobs: |
| 23 | + build: |
| 24 | + runs-on: ubuntu-latest |
| 25 | + steps: |
| 26 | + - uses: actions/checkout@v3 |
| 27 | + with: |
| 28 | + ref: "refs/pull/${{ github.event.number }}/merge" |
| 29 | + fetch-depth: 0 |
| 30 | + |
| 31 | + - name: Set up JDK11 |
| 32 | + uses: actions/setup-java@v3 |
| 33 | + with: |
| 34 | + distribution: 'temurin' |
| 35 | + java-version: '11' |
| 36 | + cache: 'maven' |
| 37 | + |
| 38 | + - name: Run Build and Tests with Coverage |
| 39 | + env: |
| 40 | + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} |
| 41 | + PR_ID: ${{ github.event.pull_request.number }} |
| 42 | + run: | |
| 43 | + git clone https://github.com/shapeblue/cloudstack-nonoss.git nonoss |
| 44 | + cd nonoss && bash -x install-non-oss.sh && cd .. |
| 45 | + mvn -P quality -Dsimulator -Dnoredist clean install |
| 46 | + curl -Os https://uploader.codecov.io/latest/linux/codecov |
| 47 | + chmod +x codecov |
| 48 | + ./codecov -t ${CODECOV_TOKEN} |
0 commit comments