21
21
steps :
22
22
- name : Checkout repository
23
23
24
+ with :
25
+ persist-credentials : false
24
26
25
27
- name : Install nightly Rust toolchain
26
28
uses :
artichoke/setup-rust/[email protected]
61
63
run : grcov strftime-ruby*.profraw --source-dir . --keep-only 'src/**/*.rs' --binary-path target/debug -t covdir --filter covered -o target/coverage/coverage.json
62
64
63
65
- name : Configure AWS Credentials
64
- uses : aws-actions/configure-aws-credentials@e3dd6a429d7300a6a4c196c26e071d42e0343502 # v4.0.2
66
+ uses : aws-actions/configure-aws-credentials@4fc4975a852c8cd99761e2de1f4ba73402e44dd9 # v4.0.3
65
67
if : github.ref == 'refs/heads/trunk'
66
68
with :
67
69
aws-region : us-west-2
82
84
83
85
- name : Check missed lines
84
86
shell : python
87
+ env :
88
+ GITHUB_REF_NAME : ${{ github.ref_name }}
89
+ GITHUB_EVENT_NAME : ${{ github.event_name }}
90
+ GITHUB_EVENT_NUMBER : ${{ github.event.number }}
85
91
run : |
86
92
import json
93
+ import os
87
94
from urllib.request import urlopen
88
95
89
96
trunk_coverage_url = "https://codecov.artichokeruby.org/strftime-ruby/coverage.json"
@@ -101,7 +108,7 @@ jobs:
101
108
print("")
102
109
103
110
104
- if "${{ github.ref_name }}" == "trunk":
111
+ if os.environ.get("GITHUB_REF_NAME") == "trunk":
105
112
# We don't need to compare trunk coverage to itself
106
113
exit(0)
107
114
@@ -114,8 +121,8 @@ jobs:
114
121
branch_coverage = json.load(local)
115
122
116
123
on = None
117
- if "${{ github.event_name }}" == "pull_request":
118
- on = "PR artichoke/strftime-ruby#${{ github.event.number }}"
124
+ if os.environ.get("GITHUB_EVENT_NAME") == "pull_request":
125
+ on = "PR artichoke/strftime-ruby#" + os.environ.get("GITHUB_EVENT_NUMBER")
119
126
120
127
print_report(branch_coverage, on=on)
121
128
0 commit comments