mirror of
https://github.com/ThrowTheSwitch/Unity
synced 2025-05-29 03:29:34 -04:00
Merge pull request #536 from ThrowTheSwitch/test/switch_to_actions
Attempt to get Actions Working
This commit is contained in:
commit
05994f5061
21
.github/workflows/main.yml
vendored
21
.github/workflows/main.yml
vendored
@ -19,23 +19,14 @@ jobs:
|
||||
# Install Ruby Testing Tools
|
||||
- name: Setup Ruby Testing Tools
|
||||
run: |
|
||||
gem install rspec
|
||||
gem install rubocop -v 0.57.2
|
||||
sudo gem install rspec
|
||||
sudo gem install rubocop -v 0.57.2
|
||||
|
||||
# Checks out repository under $GITHUB_WORKSPACE
|
||||
- name: Checkout Latest Repo
|
||||
uses: actions/checkout@v2
|
||||
|
||||
# Run Tests
|
||||
- name: Run All Unit Tests
|
||||
run: |
|
||||
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.
|
||||
|
@ -168,13 +168,13 @@ class UnityModuleGenerator
|
||||
end
|
||||
|
||||
############################
|
||||
def neutralize_filename(name, start_cap=true)
|
||||
def neutralize_filename(name, start_cap = true)
|
||||
return name if name.empty?
|
||||
name = name.split(/(?:\s+|_|(?=[A-Z][a-z]))|(?<=[a-z])(?=[A-Z])/).map{|v|v.capitalize}.join('_')
|
||||
if start_cap
|
||||
return name
|
||||
name = name.split(/(?:\s+|_|(?=[A-Z][a-z]))|(?<=[a-z])(?=[A-Z])/).map { |v| v.capitalize }.join('_')
|
||||
return if start_cap
|
||||
name
|
||||
else
|
||||
return name[0].downcase + name[1..-1]
|
||||
name[0].downcase + name[1..-1]
|
||||
end
|
||||
end
|
||||
|
||||
@ -182,8 +182,8 @@ class UnityModuleGenerator
|
||||
def create_filename(part1, part2 = '')
|
||||
name = part2.empty? ? part1 : part1 + '_' + part2
|
||||
case (@options[:naming])
|
||||
when 'bumpy' then neutralize_filename(name,false).gsub('_','')
|
||||
when 'camel' then neutralize_filename(name).gsub('_','')
|
||||
when 'bumpy' then neutralize_filename(name,false).delete('_')
|
||||
when 'camel' then neutralize_filename(name).delete('_')
|
||||
when 'snake' then neutralize_filename(name).downcase
|
||||
when 'caps' then neutralize_filename(name).upcase
|
||||
else name
|
||||
|
@ -1002,8 +1002,7 @@ void UnityAssertFloatSpecial(const UNITY_FLOAT actual,
|
||||
is_trait = !isinf(actual) && !isnan(actual);
|
||||
break;
|
||||
|
||||
case UNITY_FLOAT_INVALID_TRAIT:
|
||||
default:
|
||||
default: /* including UNITY_FLOAT_INVALID_TRAIT */
|
||||
trait_index = 0;
|
||||
trait_names[0] = UnityStrInvalidFloatTrait;
|
||||
break;
|
||||
@ -1143,8 +1142,7 @@ void UnityAssertDoubleSpecial(const UNITY_DOUBLE actual,
|
||||
is_trait = !isinf(actual) && !isnan(actual);
|
||||
break;
|
||||
|
||||
case UNITY_FLOAT_INVALID_TRAIT:
|
||||
default:
|
||||
default: /* including UNITY_FLOAT_INVALID_TRAIT */
|
||||
trait_index = 0;
|
||||
trait_names[0] = UnityStrInvalidFloatTrait;
|
||||
break;
|
||||
|
@ -10,6 +10,7 @@ endif
|
||||
CFLAGS += -std=c99 -pedantic -Wall -Wextra -Werror
|
||||
#CFLAGS += -Wconversion #disabled because if falsely complains about the isinf and isnan macros
|
||||
CFLAGS += -Wno-switch-enum -Wno-double-promotion
|
||||
CFLAGS += -Wno-poison-system-directories
|
||||
CFLAGS += -Wbad-function-cast -Wcast-qual -Wold-style-definition -Wshadow -Wstrict-overflow \
|
||||
-Wstrict-prototypes -Wswitch-default -Wundef
|
||||
#DEBUG = -O0 -g
|
||||
|
@ -300,8 +300,8 @@ module RakefileHelpers
|
||||
|
||||
def run_make_tests()
|
||||
[ "make -s", # test with all defaults
|
||||
"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", # 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 UNITY_INCLUDE_DOUBLE= ", # test without double
|
||||
"cd #{File.join("..","extras","fixture",'test')} && make -s default noStdlibMalloc",
|
||||
"cd #{File.join("..","extras","fixture",'test')} && make -s C89",
|
||||
|
Loading…
x
Reference in New Issue
Block a user