christophebedard / dco-check

Simple DCO check script to be used in any CI
Apache License 2.0
12 stars 6 forks source link

Use version_assertion_command with tag-version-commit action #88

Closed christophebedard closed 4 years ago

christophebedard commented 4 years ago

This moves the version check (git tag vs Python module version) from the publish job to the tag job, using the new version_assertion_command input for the tag-version-commit action.

codecov[bot] commented 4 years ago

Codecov Report

Merging #88 into master will increase coverage by 0.20%. The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #88      +/-   ##
==========================================
+ Coverage   73.12%   73.33%   +0.20%     
==========================================
  Files           2        2              
  Lines         480      480              
  Branches       77       77              
==========================================
+ Hits          351      352       +1     
+ Misses         98       91       -7     
- Partials       31       37       +6     
Impacted Files Coverage Δ
dco_check/dco_check.py 73.22% <0.00%> (+0.20%) :arrow_up:

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 8af0b17...a0392f5. Read the comment docs.

christophebedard commented 4 years ago

Test: https://github.com/christophebedard/dco-check/runs/1047908227?check_suite_focus=true#step:3:1

Run christophebedard/tag-version-commit@v1 with: token: *** version_assertion_command: python3 -c "import dco_check; assert dco_check.version == \"$version\", \"git tag and dco_check version do not match\"" version_regex: ^[0-9]+.[0-9]+.[0-9]+$ annotated: false dry_run: false /bin/bash -c python3 -c "import dco_check; assert dco_check.version == \"0.0.11\", \"git tag and dco_check version do not match\"" Traceback (most recent call last): File "", line 1, in AssertionError: git tag and dco_check version do not match

[error]Version assertion failed. Double check the version: 0.0.11

The module version was still 0.0.10 but the commit was 0.0.11, so it failed