diff options
Diffstat (limited to '.github')
| -rw-r--r-- | .github/workflows/build-api.yml | 23 | ||||
| -rw-r--r-- | .github/workflows/build-frontend.yml | 3 | ||||
| -rw-r--r-- | .github/workflows/build-simulator.yml | 29 |
3 files changed, 41 insertions, 14 deletions
diff --git a/.github/workflows/build-api.yml b/.github/workflows/build-api.yml index 5bbc30c4..4ae261db 100644 --- a/.github/workflows/build-api.yml +++ b/.github/workflows/build-api.yml @@ -1,9 +1,6 @@ name: Build API on: - push: - paths: - - 'api/**' pull_request: branches: [master] @@ -29,8 +26,20 @@ jobs: python -m pip install --upgrade pip pip install -r requirements.txt - name: Lint with pylint - run: | - ./check.sh + run: ./check.sh - name: Test with pytest - run: | - pytest opendc + run: pytest --cov=opendc/ --junitxml=.junit-report.xml + - name: Publish report + if: always() + uses: mikepenz/action-junit-report@v2 + with: + check_name: test (Python ${{ matrix.python }}) + report_paths: '**/.junit-report.xml' + github_token: ${{ secrets.GITHUB_TOKEN }} + - name: Upload code coverage + uses: codecov/codecov-action@v1 + with: + token: ${{ secrets.CODECOV_TOKEN }} + files: ./api/.coverage + flags: api + diff --git a/.github/workflows/build-frontend.yml b/.github/workflows/build-frontend.yml index 73ab49d5..7c1b95a7 100644 --- a/.github/workflows/build-frontend.yml +++ b/.github/workflows/build-frontend.yml @@ -1,9 +1,6 @@ name: Build Frontend on: - push: - paths: - - 'frontend/**' pull_request: branches: [master] diff --git a/.github/workflows/build-simulator.yml b/.github/workflows/build-simulator.yml index 57e8b46d..1bee19bc 100644 --- a/.github/workflows/build-simulator.yml +++ b/.github/workflows/build-simulator.yml @@ -1,9 +1,6 @@ name: Build Simulator on: - push: - paths: - - 'simulator/**' pull_request: branches: [master] @@ -21,6 +18,8 @@ jobs: steps: - name: Checkout repository uses: actions/checkout@v2 + - name: Validate Gradle wrapper + uses: gradle/wrapper-validation-action@v1 - name: Set up JDK uses: actions/setup-java@v1 with: @@ -36,4 +35,26 @@ jobs: - name: Build with Gradle run: ./gradlew assemble - name: Check with Gradle - run: ./gradlew check --info + run: ./gradlew check codeCoverageReport + - name: Publish report + if: always() + uses: mikepenz/action-junit-report@v2 + with: + check_name: test (Java ${{ matrix.java }}) + report_paths: '**/build/test-results/test/TEST-*.xml' + github_token: ${{ secrets.GITHUB_TOKEN }} + - name: Upload artifacts + if: always() + uses: actions/upload-artifact@v2 + with: + name: reports-${{ matrix.os }}-jdk${{ matrix.java }} + path: | + ./**/build/reports/**/* + ./**/build/test-results/**/* + retention-days: 5 + - name: Upload code coverage + uses: codecov/codecov-action@v1 + with: + token: ${{ secrets.CODECOV_TOKEN }} + files: ./simulator/build/reports/jacoco/report.xml + flags: simulator |
