mono_repo.dart icon indicating copy to clipboard operation
mono_repo.dart copied to clipboard

feat: GitHub Action customizations

Open dnys1 opened this issue 3 years ago • 10 comments

Adds support for an action block which can be attached to tasks to specify GitHub Action context, e.g. uses, with, etc. Instead of a separate block, this config could be in-lined but I wasn't sure if that was in keeping with the library, since providers other than GitHub are supported.

stages:
  - custom_step:
      - command:
          - ./script_a
          - ./script_b
          - ./script_c
        action:
          id: custom-scripts
          uses: ./.github/actions/my-action
          with:
            my-key: my-var
          if: always()
          working-directory: ./tool
          shell: fish

These are just some thoughts - looking forward to your feedback!

dnys1 avatar May 13 '22 00:05 dnys1

thoughts @jakemac53 @natebosch ?

kevmoo avatar May 13 '22 04:05 kevmoo

Hey @jakemac53 - still feeling like this is a good direction? I've updated the action specifier to behave like command as noted above.

dnys1 avatar May 21 '22 20:05 dnys1

cc @natebosch or @kevmoo opinions here?

jakemac53 avatar May 26 '22 15:05 jakemac53

We want to land this? @jakemac53 ?

kevmoo avatar Jun 23 '22 20:06 kevmoo

@dnys1 – you'll need to rebase this work on latest. Sorry!

kevmoo avatar Jul 11 '22 20:07 kevmoo

Hey @kevmoo, no worries and thanks for the heads up. I've rebased off the latest changes.

dnys1 avatar Jul 16 '22 19:07 dnys1

Pull Request Test Coverage Report for Build 2693092847

  • 102 of 116 (87.93%) changed or added relevant lines in 6 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.2%) to 83.912%

Changes Missing Coverage Covered Lines Changed/Added Lines %
mono_repo/lib/src/commands/github/step.g.dart 11 12 91.67%
mono_repo/lib/src/package_config.dart 5 6 83.33%
mono_repo/lib/src/github_config.dart 38 50 76.0%
<!-- Total: 102 116
Totals Coverage Status
Change from base Build 2679237497: -0.2%
Covered Lines: 1304
Relevant Lines: 1554

💛 - Coveralls

coveralls avatar Jul 18 '22 19:07 coveralls

Pull Request Test Coverage Report for Build 2693043484

  • 101 of 115 (87.83%) changed or added relevant lines in 6 files are covered.
  • 2 unchanged lines in 1 file lost coverage.
  • Overall coverage decreased (-0.2%) to 83.912%

Changes Missing Coverage Covered Lines Changed/Added Lines %
mono_repo/lib/src/commands/github/step.g.dart 11 12 91.67%
mono_repo/lib/src/package_config.dart 5 6 83.33%
mono_repo/lib/src/github_config.dart 38 50 76.0%
<!-- Total: 101 115
Files with Coverage Reduction New Missed Lines %
mono_repo/lib/src/task_type.dart 2 93.94%
<!-- Total: 2
Totals Coverage Status
Change from base Build 2679237497: -0.2%
Covered Lines: 1304
Relevant Lines: 1554

💛 - Coveralls

coveralls avatar Jul 18 '22 19:07 coveralls

Codecov Report

Merging #382 (bc155cb) into master (53aa5b2) will decrease coverage by 76.96%. The diff coverage is 0.00%.

@@            Coverage Diff             @@
##           master    #382       +/-   ##
==========================================
- Coverage   84.10%   7.13%   -76.97%     
==========================================
  Files          34      34               
  Lines        1453    1555      +102     
==========================================
- Hits         1222     111     -1111     
- Misses        231    1444     +1213     
Impacted Files Coverage Δ
mono_repo/lib/src/commands/github/github_yaml.dart 0.00% <0.00%> (-96.70%) :arrow_down:
mono_repo/lib/src/commands/github/step.dart 0.00% <0.00%> (-100.00%) :arrow_down:
mono_repo/lib/src/commands/github/step.g.dart 0.00% <0.00%> (-100.00%) :arrow_down:
mono_repo/lib/src/github_config.dart 0.00% <0.00%> (-98.37%) :arrow_down:
mono_repo/lib/src/package_config.dart 0.00% <0.00%> (-95.63%) :arrow_down:
mono_repo/lib/src/task_type.dart 10.60% <0.00%> (-82.62%) :arrow_down:
mono_repo/lib/src/raw_config.g.dart 0.00% <0.00%> (-100.00%) :arrow_down:
mono_repo/lib/src/mono_config.g.dart 0.00% <0.00%> (-100.00%) :arrow_down:
mono_repo/lib/src/ci_test_script.dart 0.00% <0.00%> (-100.00%) :arrow_down:
mono_repo/lib/src/package_config.g.dart 0.00% <0.00%> (-100.00%) :arrow_down:
... and 26 more

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 53aa5b2...bc155cb. Read the comment docs.

codecov-commenter avatar Jul 18 '22 19:07 codecov-commenter

Hi, any plans to continue this? I would love to have this feature implemented.

provokateurin avatar Sep 25 '22 00:09 provokateurin