Skip to content

Merge pull request #7 from Producement/add-test #46

Merge pull request #7 from Producement/add-test

Merge pull request #7 from Producement/add-test #46

Workflow file for this run

name: Test
on:
push:
branches:
- main
pull_request:
branches:
- main
permissions:
pull-requests: write
contents: read
actions: read
checks: write
jobs:
check:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- 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
run: dart analyze
- name: Activate coverage
if: github.event_name == 'pull_request'
run: dart pub global activate coverage
- name: Test with coverage
if: github.event_name == 'pull_request'
run: dart pub global run coverage:test_with_coverage
- name: Test
if: github.event_name != 'pull_request'
run: dart test
- name: Collect coverage
uses: romeovs/[email protected]
if: github.event_name == 'pull_request'
with:
lcov-file: ./coverage/lcov.info
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Test Report
uses: dorny/test-reporter@v1
if: success() || failure() && github.event_name != 'pull_request'
with:
name: Test report
path: reports/test-results.json
reporter: dart-json