Skip to content

Commit 05994f5

Browse files
authored
Merge pull request #536 from ThrowTheSwitch/test/switch_to_actions
Attempt to get Actions Working
2 parents ce132da + fcab680 commit 05994f5

5 files changed

Lines changed: 18 additions & 28 deletions

File tree

.github/workflows/main.yml

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -19,23 +19,14 @@ jobs:
1919
# Install Ruby Testing Tools
2020
- name: Setup Ruby Testing Tools
2121
run: |
22-
gem install rspec
23-
gem install rubocop -v 0.57.2
22+
sudo gem install rspec
23+
sudo gem install rubocop -v 0.57.2
24+
25+
# Checks out repository under $GITHUB_WORKSPACE
26+
- name: Checkout Latest Repo
27+
uses: actions/checkout@v2
2428

2529
# Run Tests
2630
- name: Run All Unit Tests
2731
run: |
2832
cd test && rake ci
29-
30-
# Slack notification
31-
- uses: 8398a7/action-slack@v3
32-
with:
33-
icon_emoji: ':octocat:'
34-
status: ${{ job.status }}
35-
# Github Actions limit visibility into renamed jobs; explicit job names here solve this limitation
36-
job_name: "Unit Tests"
37-
fields: repo,author,eventName,workflow,job
38-
env:
39-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
40-
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_CI_CHANNEL_WEBHOOK }}
41-
if: always() # Pick up events even if the job fails or is canceled.

auto/generate_module.rb

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -168,22 +168,22 @@ def files_to_operate_on(module_name, pattern = nil)
168168
end
169169

170170
############################
171-
def neutralize_filename(name, start_cap=true)
171+
def neutralize_filename(name, start_cap = true)
172172
return name if name.empty?
173-
name = name.split(/(?:\s+|_|(?=[A-Z][a-z]))|(?<=[a-z])(?=[A-Z])/).map{|v|v.capitalize}.join('_')
174-
if start_cap
175-
return name
173+
name = name.split(/(?:\s+|_|(?=[A-Z][a-z]))|(?<=[a-z])(?=[A-Z])/).map { |v| v.capitalize }.join('_')
174+
return if start_cap
175+
name
176176
else
177-
return name[0].downcase + name[1..-1]
177+
name[0].downcase + name[1..-1]
178178
end
179179
end
180180

181181
############################
182182
def create_filename(part1, part2 = '')
183183
name = part2.empty? ? part1 : part1 + '_' + part2
184184
case (@options[:naming])
185-
when 'bumpy' then neutralize_filename(name,false).gsub('_','')
186-
when 'camel' then neutralize_filename(name).gsub('_','')
185+
when 'bumpy' then neutralize_filename(name,false).delete('_')
186+
when 'camel' then neutralize_filename(name).delete('_')
187187
when 'snake' then neutralize_filename(name).downcase
188188
when 'caps' then neutralize_filename(name).upcase
189189
else name

src/unity.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1002,8 +1002,7 @@ void UnityAssertFloatSpecial(const UNITY_FLOAT actual,
10021002
is_trait = !isinf(actual) && !isnan(actual);
10031003
break;
10041004

1005-
case UNITY_FLOAT_INVALID_TRAIT:
1006-
default:
1005+
default: /* including UNITY_FLOAT_INVALID_TRAIT */
10071006
trait_index = 0;
10081007
trait_names[0] = UnityStrInvalidFloatTrait;
10091008
break;
@@ -1143,8 +1142,7 @@ void UnityAssertDoubleSpecial(const UNITY_DOUBLE actual,
11431142
is_trait = !isinf(actual) && !isnan(actual);
11441143
break;
11451144

1146-
case UNITY_FLOAT_INVALID_TRAIT:
1147-
default:
1145+
default: /* including UNITY_FLOAT_INVALID_TRAIT */
11481146
trait_index = 0;
11491147
trait_names[0] = UnityStrInvalidFloatTrait;
11501148
break;

test/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ endif
1010
CFLAGS += -std=c99 -pedantic -Wall -Wextra -Werror
1111
#CFLAGS += -Wconversion #disabled because if falsely complains about the isinf and isnan macros
1212
CFLAGS += -Wno-switch-enum -Wno-double-promotion
13+
CFLAGS += -Wno-poison-system-directories
1314
CFLAGS += -Wbad-function-cast -Wcast-qual -Wold-style-definition -Wshadow -Wstrict-overflow \
1415
-Wstrict-prototypes -Wswitch-default -Wundef
1516
#DEBUG = -O0 -g

test/rakefile_helper.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -300,8 +300,8 @@ def run_tests(test_files)
300300

301301
def run_make_tests()
302302
[ "make -s", # test with all defaults
303-
"make -s DEBUG=-m32", # test 32-bit architecture with 64-bit support
304-
"make -s DEBUG=-m32 UNITY_SUPPORT_64=", # test 32-bit build without 64-bit types
303+
#"make -s DEBUG=-m32", # test 32-bit architecture with 64-bit support
304+
#"make -s DEBUG=-m32 UNITY_SUPPORT_64=", # test 32-bit build without 64-bit types
305305
"make -s UNITY_INCLUDE_DOUBLE= ", # test without double
306306
"cd #{File.join("..","extras","fixture",'test')} && make -s default noStdlibMalloc",
307307
"cd #{File.join("..","extras","fixture",'test')} && make -s C89",

0 commit comments

Comments
 (0)