Skip to content
This repository has been archived by the owner on Nov 7, 2024. It is now read-only.

fixes unit test about main-mock #11

fixes unit test about main-mock

fixes unit test about main-mock #11

Workflow file for this run

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
name: CI
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
# https://github.com/dart-lang/setup-dart/blob/main/README.md
- name: Install Dart SDK
uses: dart-lang/setup-dart@v1
- name: Install dependencies
run: dart pub get
- name: Verify formatting
run: dart format --output=none --set-exit-if-changed .
- name: Analyze project source
run: dart analyze --fatal-infos
- name: Run tests (& collect coverage)
run: dart run coverage:test_with_coverage --function-coverage --branch-coverage
- name: Upload coverage report
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
files: ./coverage/coverage.json,./coverage/lcov.info
verbose: true # optional (default = false)
- name: Make docs
run: dart doc
- name: Upload docs as CI artifact
uses: actions/upload-artifact@v3
with:
path: doc/api
# built binaries are exclusive to the architecture used to compile.
name: cpp_linter_dart docs
build:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Install Dart SDK
uses: dart-lang/setup-dart@v1
- name: Install dependencies
run: dart pub get
- name: Compile binary
run: |
mkdir -p dist/${{ runner.os }}
dart compile exe -o dist/${{ runner.os }}/cpp-linter ./bin/cpp_linter_dart.dart
- name: Upload built binary as CI artifact
uses: actions/upload-artifact@v3
with:
path: dist/${{ runner.os }}/cpp-linter
# built binaries are exclusive to the architecture used to compile.
name: cpp-linter_${{ runner.os }}_${{ runner.arch }}