1
0
mirror of https://github.com/ThrowTheSwitch/Unity.git synced 2026-01-29 19:24:27 +01:00

Merge pull request #536 from ThrowTheSwitch/test/switch_to_actions

Attempt to get Actions Working
This commit is contained in:
Mark VanderVoord
2021-01-16 21:05:49 -05:00
committed by GitHub
5 changed files with 18 additions and 28 deletions

View File

@@ -19,23 +19,14 @@ jobs:
# Install Ruby Testing Tools # Install Ruby Testing Tools
- name: Setup Ruby Testing Tools - name: Setup Ruby Testing Tools
run: | run: |
gem install rspec sudo gem install rspec
gem install rubocop -v 0.57.2 sudo gem install rubocop -v 0.57.2
# Checks out repository under $GITHUB_WORKSPACE
- name: Checkout Latest Repo
uses: actions/checkout@v2
# Run Tests # Run Tests
- name: Run All Unit Tests - name: Run All Unit Tests
run: | run: |
cd test && rake ci cd test && rake ci
# Slack notification
- uses: 8398a7/action-slack@v3
with:
icon_emoji: ':octocat:'
status: ${{ job.status }}
# Github Actions limit visibility into renamed jobs; explicit job names here solve this limitation
job_name: "Unit Tests"
fields: repo,author,eventName,workflow,job
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_CI_CHANNEL_WEBHOOK }}
if: always() # Pick up events even if the job fails or is canceled.

View File

@@ -168,13 +168,13 @@ class UnityModuleGenerator
end end
############################ ############################
def neutralize_filename(name, start_cap=true) def neutralize_filename(name, start_cap = true)
return name if name.empty? return name if name.empty?
name = name.split(/(?:\s+|_|(?=[A-Z][a-z]))|(?<=[a-z])(?=[A-Z])/).map{|v|v.capitalize}.join('_') name = name.split(/(?:\s+|_|(?=[A-Z][a-z]))|(?<=[a-z])(?=[A-Z])/).map { |v| v.capitalize }.join('_')
if start_cap return if start_cap
return name name
else else
return name[0].downcase + name[1..-1] name[0].downcase + name[1..-1]
end end
end end
@@ -182,8 +182,8 @@ class UnityModuleGenerator
def create_filename(part1, part2 = '') def create_filename(part1, part2 = '')
name = part2.empty? ? part1 : part1 + '_' + part2 name = part2.empty? ? part1 : part1 + '_' + part2
case (@options[:naming]) case (@options[:naming])
when 'bumpy' then neutralize_filename(name,false).gsub('_','') when 'bumpy' then neutralize_filename(name,false).delete('_')
when 'camel' then neutralize_filename(name).gsub('_','') when 'camel' then neutralize_filename(name).delete('_')
when 'snake' then neutralize_filename(name).downcase when 'snake' then neutralize_filename(name).downcase
when 'caps' then neutralize_filename(name).upcase when 'caps' then neutralize_filename(name).upcase
else name else name

View File

@@ -1002,8 +1002,7 @@ void UnityAssertFloatSpecial(const UNITY_FLOAT actual,
is_trait = !isinf(actual) && !isnan(actual); is_trait = !isinf(actual) && !isnan(actual);
break; break;
case UNITY_FLOAT_INVALID_TRAIT: default: /* including UNITY_FLOAT_INVALID_TRAIT */
default:
trait_index = 0; trait_index = 0;
trait_names[0] = UnityStrInvalidFloatTrait; trait_names[0] = UnityStrInvalidFloatTrait;
break; break;
@@ -1143,8 +1142,7 @@ void UnityAssertDoubleSpecial(const UNITY_DOUBLE actual,
is_trait = !isinf(actual) && !isnan(actual); is_trait = !isinf(actual) && !isnan(actual);
break; break;
case UNITY_FLOAT_INVALID_TRAIT: default: /* including UNITY_FLOAT_INVALID_TRAIT */
default:
trait_index = 0; trait_index = 0;
trait_names[0] = UnityStrInvalidFloatTrait; trait_names[0] = UnityStrInvalidFloatTrait;
break; break;

View File

@@ -10,6 +10,7 @@ endif
CFLAGS += -std=c99 -pedantic -Wall -Wextra -Werror CFLAGS += -std=c99 -pedantic -Wall -Wextra -Werror
#CFLAGS += -Wconversion #disabled because if falsely complains about the isinf and isnan macros #CFLAGS += -Wconversion #disabled because if falsely complains about the isinf and isnan macros
CFLAGS += -Wno-switch-enum -Wno-double-promotion CFLAGS += -Wno-switch-enum -Wno-double-promotion
CFLAGS += -Wno-poison-system-directories
CFLAGS += -Wbad-function-cast -Wcast-qual -Wold-style-definition -Wshadow -Wstrict-overflow \ CFLAGS += -Wbad-function-cast -Wcast-qual -Wold-style-definition -Wshadow -Wstrict-overflow \
-Wstrict-prototypes -Wswitch-default -Wundef -Wstrict-prototypes -Wswitch-default -Wundef
#DEBUG = -O0 -g #DEBUG = -O0 -g

View File

@@ -300,8 +300,8 @@ module RakefileHelpers
def run_make_tests() def run_make_tests()
[ "make -s", # test with all defaults [ "make -s", # test with all defaults
"make -s DEBUG=-m32", # test 32-bit architecture with 64-bit support #"make -s DEBUG=-m32", # test 32-bit architecture with 64-bit support
"make -s DEBUG=-m32 UNITY_SUPPORT_64=", # test 32-bit build without 64-bit types #"make -s DEBUG=-m32 UNITY_SUPPORT_64=", # test 32-bit build without 64-bit types
"make -s UNITY_INCLUDE_DOUBLE= ", # test without double "make -s UNITY_INCLUDE_DOUBLE= ", # test without double
"cd #{File.join("..","extras","fixture",'test')} && make -s default noStdlibMalloc", "cd #{File.join("..","extras","fixture",'test')} && make -s default noStdlibMalloc",
"cd #{File.join("..","extras","fixture",'test')} && make -s C89", "cd #{File.join("..","extras","fixture",'test')} && make -s C89",