diff --git a/NetNewsWire-CI.xctestplan b/NetNewsWire-CI.xctestplan index af4fc0134..3e9cb0e43 100644 --- a/NetNewsWire-CI.xctestplan +++ b/NetNewsWire-CI.xctestplan @@ -10,6 +10,12 @@ ], "defaultOptions" : { "codeCoverage" : false, + "environmentVariableEntries" : [ + { + "key" : "SKIP_SCRIPTING_TESTS", + "value" : "YES" + } + ], "targetForVariableExpansion" : { "containerPath" : "container:NetNewsWire.xcodeproj", "identifier" : "849C645F1ED37A5D003D8FC0", @@ -32,14 +38,6 @@ } }, { - "skippedTests" : [ - "ScriptingTests\/feedExists()", - "ScriptingTests\/genericScript()", - "ScriptingTests\/getURLScript()", - "ScriptingTests\/nameAndURLOfEveryFeedScript()", - "ScriptingTests\/nameOfAuthorsScript()", - "ScriptingTests\/nameOfEveryFolderScript()" - ], "target" : { "containerPath" : "container:NetNewsWire.xcodeproj", "identifier" : "849C64701ED37A5D003D8FC0", diff --git a/Tests/NetNewsWireTests/ScriptingTests/ScriptingTests.swift b/Tests/NetNewsWireTests/ScriptingTests/ScriptingTests.swift index c24d88e12..9e50e744f 100644 --- a/Tests/NetNewsWireTests/ScriptingTests/ScriptingTests.swift +++ b/Tests/NetNewsWireTests/ScriptingTests/ScriptingTests.swift @@ -6,9 +6,13 @@ // Copyright © 2018 Olof Hellman. All rights reserved. // +import Foundation import Testing -@MainActor struct ScriptingTests { +/// Set by NetNewsWire-CI.xctestplan. Test plan skippedTests entries don’t skip these Swift Testing tests. +private let skipScriptingTestsEnvironmentKey = "SKIP_SCRIPTING_TESTS" + +@MainActor @Suite(.disabled(if: ProcessInfo.processInfo.environment[skipScriptingTestsEnvironmentKey] != nil, "AppleScript tests can’t run on CI")) struct ScriptingTests { // An example of how a script can be run as part of a test. // The script returns {test_result:true, script_result:"Geoducks!"}.