Allow parsing of streams with extra whitespaces (#51) #81
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: | |
pull_request: | |
types: [ opened, reopened, synchronize, ready_for_review ] | |
push: | |
branches: | |
- 'main' | |
workflow_dispatch: | |
inputs: | |
branch: | |
description: 'Branch to run tests on' | |
required: true | |
default: 'main' | |
name: PR CI/CD | |
# cancel already running jobs for same PR | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
permissions: | |
statuses: write | |
checks: write | |
contents: write | |
pull-requests: write | |
actions: write | |
jobs: | |
analyze: | |
timeout-minutes: 5 | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: dart-lang/setup-dart@v1 | |
with: | |
sdk: stable | |
- name: Install dependencies | |
run: dart pub get | |
- run: dart analyze --fatal-infos | |
test: | |
timeout-minutes: 5 | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: dart-lang/setup-dart@v1 | |
with: | |
sdk: stable | |
- name: Install dependencies | |
run: dart pub get | |
- name: Install coverage | |
run: dart pub global activate coverage | |
- uses: stelynx/[email protected] | |
with: | |
package: dart_pdf_reader | |
- run: dart test --no-color test --file-reporter "json:unit.test.json" --coverage="coverage" | |
- name: Convert coverage | |
run: $HOME/.pub-cache/bin/format_coverage --lcov --in=coverage --out=coverage.lcov --report-on=lib --check-ignore | |
- name: Upload coverage reports to Codecov | |
uses: codecov/codecov-action@v3 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
- name: Test Report | |
if: always() | |
uses: dorny/test-reporter@v1 | |
with: | |
name: Unit Tests | |
path: unit.test.json | |
reporter: dart-json |