Skip to content

Update C API to 0.19 #1359

Update C API to 0.19

Update C API to 0.19 #1359

Workflow file for this run

name: Code analysis
# Avoid duplicate builds for pull requests, allow manual trigger.
on:
push:
branches:
- main
pull_request:
workflow_dispatch:
jobs:
analyze:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
# Prefer running on Ubuntu over Dart Docker image
- uses: dart-lang/setup-dart@v1
with:
sdk: 3.0.3
- name: Get dependencies
run: |
dart pub get --directory=benchmark
dart pub get --directory=generator
dart pub get --directory=objectbox
dart pub get --directory=objectbox_test
- name: Generate code (benchmark)
working-directory: benchmark
run: dart run build_runner build
- name: Generate code (objectbox_test)
working-directory: objectbox_test
run: dart run build_runner build
- name: Analyze Dart packages
run: |
dart analyze benchmark
dart analyze generator
dart analyze objectbox
dart analyze objectbox_test
- name: Check formatting of all packages
run: dart format --set-exit-if-changed --fix .
pana:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: axel-op/dart-package-analyzer@v3
id: analysis # set an id for the current step
with:
githubToken: ${{ secrets.GITHUB_TOKEN }}
relativePath: objectbox
# You can then use this id to retrieve the outputs in the next steps.
# The following step shows how to exit the workflow with an error if a score is below 100:
- name: Check scores
shell: bash
run: |
if [[ "${{ steps.analysis.outputs.total }}" != "130" ]]; then
echo "Expected score 130, got ${{ steps.analysis.outputs.total }}, please check the analysis report and resolve the issues"
exit 1
fi
coverage:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
# Prefer running on Ubuntu over Dart Docker image
- uses: dart-lang/setup-dart@v1
with:
sdk: 3.0.3
- name: Install coverage tools
run: |
./tool/apt-install.sh lcov
dart pub global activate coverage
- name: Prepare objectbox_test
working-directory: objectbox_test
run: |
dart pub get
dart run build_runner build
- name: Prepare objectbox
working-directory: objectbox
run: |
../install.sh
dart pub get
- name: Generate test coverage
working-directory: objectbox
run: ./tool/coverage.sh
- uses: devmasx/[email protected]
with:
type: lcov
result_path: objectbox/coverage/lcov.info
min_coverage: 90
token: ${{ github.token }}
- uses: danielpalme/[email protected]
with:
reports: 'objectbox/coverage/lcov.info'
targetdir: 'coveragereport'
reporttypes: 'HtmlInline' # The output formats and scope (separated by semicolon) Values: Badges, Clover, Cobertura, CsvSummary, Html, HtmlChart, HtmlInline, HtmlInline_AzurePipelines, HtmlInline_AzurePipelines_Dark, HtmlSummary, JsonSummary, Latex, LatexSummary, lcov, MarkdownSummary, MHtml, PngChart, SonarQube, TeamCitySummary, TextSummary, Xml, XmlSummary
sourcedirs: 'objectbox'
- uses: actions/upload-artifact@v3
with:
name: CoverageReport # Artifact name
path: coveragereport # Directory containing files to upload