chore: v0.5.0 release #13
Workflow file for this run
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
name: Test | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
workflow_call: | |
inputs: | |
upload_coverage: | |
description: "Upload coverage to codecov" | |
type: boolean | |
required: false | |
default: false | |
defaults: | |
run: | |
shell: bash | |
env: | |
PUB_ENVIRONMENT: bot.github | |
permissions: read-all | |
jobs: | |
validate: | |
timeout-minutes: 5 | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: dart-lang/setup-dart@v1 | |
with: | |
sdk: stable | |
- name: Activate melos | |
run: dart pub global activate melos | |
- name: Bootstrap melos | |
run: melos bs | |
- name: Validate code | |
run: melos run validate | |
- name: Test code | |
run: melos run test | |
- name: Activate coverage | |
run: dart pub global activate coverage | |
- name: Run coverage | |
run: melos run lcov | |
- name: Upload Coverage | |
if: ${{ (github.event_name == 'push' && github.ref == 'refs/heads/main') || (github.event_name == 'workflow_call' && inputs.upload_coverage == true) }} | |
uses: codecov/codecov-action@v3 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
files: packages/*/coverage/lcov.info |