Skip to content
This repository was archived by the owner on Jan 19, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 61 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,25 @@ jobs:
uses: gradle/wrapper-validation-action@v1

- name: Build with Gradle
run: ./gradlew build
run: ./gradlew build koverMergedXmlReport
working-directory: ./api-editor

- name: Upload test report
if: ${{ failure() }}
uses: actions/upload-artifact@v3
with:
name: backend test report
path: api-editor/backend/build/reports
if-no-files-found: ignore

- name: Upload coverage to Codecov
if: ${{ github.actor != 'dependabot[bot]' }}
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
directory: api-editor/build/reports/kover/merged/xml
files: report.xml

- name: Install dependencies
run: npm ci

Expand All @@ -51,6 +67,40 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

gui-test-coverage:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./api-editor/gui

strategy:
matrix:
node-version: [ 18.x ]

steps:
- name: Checkout source
uses: actions/checkout@v3

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: npm
cache-dependency-path: api-editor/gui/package-lock.json

- name: Install dependencies
run: npm ci

- name: Test with Jest
run: npm run test-with-coverage

- name: Upload coverage to Codecov
if: ${{ github.actor != 'dependabot[bot]' }}
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
directory: api-editor/gui/coverage
files: clover.xml

build-package-parser:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -104,5 +154,14 @@ jobs:
- name: Smoke test (migration)
run: poetry run parse-package migrate -a1 tests/data/migration/apiv1_data.json -a2 tests/data/migration/apiv2_data.json -a tests/data/migration/annotationv1.json -o out

# Requires installation of pytest and pytest-cov
- name: Test with pytest
run: poetry run pytest --doctest-modules
run: poetry run pytest --doctest-modules --cov=package_parser --cov-report=xml

- name: Upload coverage to Codecov
if: ${{ github.actor != 'dependabot[bot]' }}
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
directory: package-parser
files: coverage.xml
31 changes: 17 additions & 14 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
uses: gradle/wrapper-validation-action@v1

- name: Build with Gradle
run: ./gradlew build backend:koverHtmlReport
run: ./gradlew build koverMergedXmlReport

- name: Upload test report
if: ${{ failure() }}
Expand All @@ -53,12 +53,13 @@ jobs:
path: api-editor/backend/build/reports
if-no-files-found: ignore

- name: Upload test coverage
- name: Upload coverage to Codecov
if: ${{ github.actor != 'dependabot[bot]' }}
uses: actions/upload-artifact@v3
uses: codecov/codecov-action@v3
with:
name: backend test coverage
path: api-editor/backend/build/reports/kover/html/
token: ${{ secrets.CODECOV_TOKEN }}
directory: api-editor/build/reports/kover/merged/xml
files: report.xml

gui-test-coverage:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -87,12 +88,13 @@ jobs:
- name: Test with Jest
run: npm run test-with-coverage

- name: Upload test report
- name: Upload coverage to Codecov
if: ${{ github.actor != 'dependabot[bot]' }}
uses: actions/upload-artifact@v3
uses: codecov/codecov-action@v3
with:
name: gui test coverage
path: api-editor/gui/coverage/lcov-report
token: ${{ secrets.CODECOV_TOKEN }}
directory: api-editor/gui/coverage
files: clover.xml

build-package-parser:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -145,11 +147,12 @@ jobs:

# Requires installation of pytest and pytest-cov
- name: Test with pytest
run: poetry run pytest --doctest-modules --cov=package_parser --cov-report=html
run: poetry run pytest --doctest-modules --cov=package_parser --cov-report=xml

- name: Upload test coverage
- name: Upload coverage to Codecov
if: ${{ github.actor != 'dependabot[bot]' }}
uses: actions/upload-artifact@v3
uses: codecov/codecov-action@v3
with:
name: package-parser test coverage
path: package-parser/htmlcov
token: ${{ secrets.CODECOV_TOKEN }}
directory: package-parser
files: coverage.xml
4 changes: 2 additions & 2 deletions api-editor/gui/src/features/externalLinks/urlBuilder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ const baseURL = 'https://github.com/lars-reimann/api-editor';

// Documentation

const documentationBaseURL = `${baseURL}/blob/main/docs`;
const documentationBaseURL = `https://api-editor.readthedocs.io/en/latest`;

export const userGuideURL = `${documentationBaseURL}/api-editor.md`;
export const userGuideURL = `${documentationBaseURL}/gui`;

// Issues

Expand Down
26 changes: 26 additions & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
codecov:
notify:
after_n_builds: 3

comment:
after_n_builds: 3
layout: 'header, diff, flags, components, files'

component_management:
individual_components:
- component_id: module_backend
name: backend
paths:
- api-editor/backend/**
- component_id: module_desktop
name: desktop
paths:
- api-editor/desktop/**
- component_id: module_gui
name: gui
paths:
- api-editor/gui/**
- component_id: module_package-parser
name: package-parser
paths:
- package-parser/**