Skip to content

Commit

Permalink
build: github actions work flow for swiftlint
Browse files Browse the repository at this point in the history
dependency delete and pull
  • Loading branch information
yuncheol-AHN committed Nov 7, 2024
1 parent 2bfa353 commit 9b3018d
Show file tree
Hide file tree
Showing 9 changed files with 95 additions and 28 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/swift.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ jobs:
env:
BUILD_CERTIFICATE_BASE64: ${{ secrets.BUILD_CERTIFICATE_BASE64 }}
P12_PASSWORD: ${{ secrets.P12_PASSWORD }}
BUILD_PROVISION_PROFILE_BASE64: ${{ secrets.BUILD_PROVISION_PROFILE_BASE64 }}
KEYCHAIN_PASSWORD: ${{ secrets.KEYCHAIN_PASSWORD }}
run: |
# create variables
Expand All @@ -23,6 +24,7 @@ jobs:
# import certificate and provisioning profile from secrets
echo -n "$BUILD_CERTIFICATE_BASE64" | base64 --decode -o $CERTIFICATE_PATH
echo -n "$BUILD_PROVISION_PROFILE_BASE64" | base64 --decode -o $PP_PATH
# create temporary keychain
security create-keychain -p "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH
Expand Down
25 changes: 25 additions & 0 deletions .github/workflows/swiftlint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: swiftlint 🔨

on:
pull_request:
branches: ["develop"]
paths:
- ".github/workflows/swiftlint.yml"
- ".swiftlint.yml"
- "**/*.swift"

jobs:
SwiftLint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: GitHub Action for SwiftLint
uses: norio-nomura/[email protected]
- name: GitHub Action for SwiftLint (Only files changed in the PR)
uses: norio-nomura/[email protected]
env:
DIFF_BASE: ${{ github.base_ref }}
- name: GitHub Action for SwiftLint (Different working directory)
uses: norio-nomura/[email protected]
env:
WORKING_DIRECTORY: Source
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,6 @@
buildRules = (
);
dependencies = (
CED59DC52CD9E07B005BE50D /* PBXTargetDependency */,
);
name = MemorialHouse;
packageProductDependencies = (
Expand Down Expand Up @@ -189,7 +188,7 @@
mainGroup = 0EE4A0772CD5DD1800F17FA5;
minimizedProjectReferenceProxies = 1;
packageReferences = (
CED59DC32CD9E053005BE50D /* XCRemoteSwiftPackageReference "SwiftLintPlugins" */,
DB4326A12CDD1E78009C03B8 /* XCRemoteSwiftPackageReference "SwiftLintPlugins" */,
);
preferredProjectObjectVersion = 77;
productRefGroup = 0EE4A0812CD5DD1800F17FA5 /* Products */;
Expand Down Expand Up @@ -247,13 +246,6 @@
};
/* End PBXSourcesBuildPhase section */

/* Begin PBXTargetDependency section */
CED59DC52CD9E07B005BE50D /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
productRef = CED59DC42CD9E07B005BE50D /* SwiftLintBuildToolPlugin */;
};
/* End PBXTargetDependency section */

/* Begin PBXVariantGroup section */
0EE4A09C2CD5DD2400F17FA5 /* LaunchScreen.storyboard */ = {
isa = PBXVariantGroup;
Expand Down Expand Up @@ -477,7 +469,7 @@
/* End XCConfigurationList section */

/* Begin XCRemoteSwiftPackageReference section */
CED59DC32CD9E053005BE50D /* XCRemoteSwiftPackageReference "SwiftLintPlugins" */ = {
DB4326A12CDD1E78009C03B8 /* XCRemoteSwiftPackageReference "SwiftLintPlugins" */ = {
isa = XCRemoteSwiftPackageReference;
repositoryURL = "https://github.com/SimplyDanny/SwiftLintPlugins";
requirement = {
Expand All @@ -486,14 +478,6 @@
};
};
/* End XCRemoteSwiftPackageReference section */

/* Begin XCSwiftPackageProductDependency section */
CED59DC42CD9E07B005BE50D /* SwiftLintBuildToolPlugin */ = {
isa = XCSwiftPackageProductDependency;
package = CED59DC32CD9E053005BE50D /* XCRemoteSwiftPackageReference "SwiftLintPlugins" */;
productName = "plugin:SwiftLintBuildToolPlugin";
};
/* End XCSwiftPackageProductDependency section */
};
rootObject = 0EE4A0782CD5DD1800F17FA5 /* Project object */;
}
4 changes: 2 additions & 2 deletions MemorialHouse/MHCore/MHCore.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@
mainGroup = CE9AEBB12CD7B5EF00F8471D;
minimizedProjectReferenceProxies = 1;
packageReferences = (
0E7F28842CDA07E7007D4F2B /* XCRemoteSwiftPackageReference "SwiftLintPlugins" */,
DB4326A22CDD1E9A009C03B8 /* XCRemoteSwiftPackageReference "SwiftLintPlugins" */,
);
preferredProjectObjectVersion = 77;
productRefGroup = CE9AEBBC2CD7B5EF00F8471D /* Products */;
Expand Down Expand Up @@ -405,7 +405,7 @@
/* End XCConfigurationList section */

/* Begin XCRemoteSwiftPackageReference section */
0E7F28842CDA07E7007D4F2B /* XCRemoteSwiftPackageReference "SwiftLintPlugins" */ = {
DB4326A22CDD1E9A009C03B8 /* XCRemoteSwiftPackageReference "SwiftLintPlugins" */ = {
isa = XCRemoteSwiftPackageReference;
repositoryURL = "https://github.com/SimplyDanny/SwiftLintPlugins";
requirement = {
Expand Down
4 changes: 2 additions & 2 deletions MemorialHouse/MHData/MHData.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@
mainGroup = CE9AEB6D2CD7B46700F8471D;
minimizedProjectReferenceProxies = 1;
packageReferences = (
0E7F288B2CDA086E007D4F2B /* XCRemoteSwiftPackageReference "SwiftLintPlugins" */,
DB4326A52CDD1ECE009C03B8 /* XCRemoteSwiftPackageReference "SwiftLintPlugins" */,
);
preferredProjectObjectVersion = 77;
productRefGroup = CE9AEB782CD7B46700F8471D /* Products */;
Expand Down Expand Up @@ -413,7 +413,7 @@
/* End XCConfigurationList section */

/* Begin XCRemoteSwiftPackageReference section */
0E7F288B2CDA086E007D4F2B /* XCRemoteSwiftPackageReference "SwiftLintPlugins" */ = {
DB4326A52CDD1ECE009C03B8 /* XCRemoteSwiftPackageReference "SwiftLintPlugins" */ = {
isa = XCRemoteSwiftPackageReference;
repositoryURL = "https://github.com/SimplyDanny/SwiftLintPlugins";
requirement = {
Expand Down
4 changes: 2 additions & 2 deletions MemorialHouse/MHDomain/MHDomain.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@
mainGroup = CE9AEB442CD7B31300F8471D;
minimizedProjectReferenceProxies = 1;
packageReferences = (
0E7F288D2CDA0881007D4F2B /* XCRemoteSwiftPackageReference "SwiftLintPlugins" */,
DB4326A62CDD1ED8009C03B8 /* XCRemoteSwiftPackageReference "SwiftLintPlugins" */,
);
preferredProjectObjectVersion = 77;
productRefGroup = CE9AEB4F2CD7B31300F8471D /* Products */;
Expand Down Expand Up @@ -409,7 +409,7 @@
/* End XCConfigurationList section */

/* Begin XCRemoteSwiftPackageReference section */
0E7F288D2CDA0881007D4F2B /* XCRemoteSwiftPackageReference "SwiftLintPlugins" */ = {
DB4326A62CDD1ED8009C03B8 /* XCRemoteSwiftPackageReference "SwiftLintPlugins" */ = {
isa = XCRemoteSwiftPackageReference;
repositoryURL = "https://github.com/SimplyDanny/SwiftLintPlugins";
requirement = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@
mainGroup = DB3CB96B2CD9B08A008186F4;
minimizedProjectReferenceProxies = 1;
packageReferences = (
0E7F28862CDA082A007D4F2B /* XCRemoteSwiftPackageReference "SwiftLintPlugins" */,
DB4326A32CDD1EB7009C03B8 /* XCRemoteSwiftPackageReference "SwiftLintPlugins" */,
);
preferredProjectObjectVersion = 77;
productRefGroup = DB3CB9762CD9B08A008186F4 /* Products */;
Expand Down Expand Up @@ -397,7 +397,7 @@
/* End XCConfigurationList section */

/* Begin XCRemoteSwiftPackageReference section */
0E7F28862CDA082A007D4F2B /* XCRemoteSwiftPackageReference "SwiftLintPlugins" */ = {
DB4326A32CDD1EB7009C03B8 /* XCRemoteSwiftPackageReference "SwiftLintPlugins" */ = {
isa = XCRemoteSwiftPackageReference;
repositoryURL = "https://github.com/SimplyDanny/SwiftLintPlugins";
requirement = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@
mainGroup = CE9AEB8F2CD7B4F200F8471D;
minimizedProjectReferenceProxies = 1;
packageReferences = (
0E7F28892CDA084F007D4F2B /* XCRemoteSwiftPackageReference "SwiftLintPlugins" */,
DB4326A42CDD1EC2009C03B8 /* XCRemoteSwiftPackageReference "SwiftLintPlugins" */,
);
preferredProjectObjectVersion = 77;
productRefGroup = CE9AEB9A2CD7B4F200F8471D /* Products */;
Expand Down Expand Up @@ -465,7 +465,7 @@
/* End XCConfigurationList section */

/* Begin XCRemoteSwiftPackageReference section */
0E7F28892CDA084F007D4F2B /* XCRemoteSwiftPackageReference "SwiftLintPlugins" */ = {
DB4326A42CDD1EC2009C03B8 /* XCRemoteSwiftPackageReference "SwiftLintPlugins" */ = {
isa = XCRemoteSwiftPackageReference;
repositoryURL = "https://github.com/SimplyDanny/SwiftLintPlugins";
requirement = {
Expand Down
56 changes: 56 additions & 0 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
import PackageDescription

let package = Package(
name: "MemorialHouse",
products: [
.library(name: "MHDomain", targets: ["MHDomain"]),
.library(name: "MHCore", targets: ["MHCore"]),
.library(name: "MHData", targets: ["MHData"]),
.library(name: "MHFoundation", targets: ["MHFoundation"]),
.library(name: "MHPresentation", targets: ["MHPresentation"]),
.library(name: "MHApplication", targets: ["MHApplication"]),

Check warning on line 11 in Package.swift

View workflow job for this annotation

GitHub Actions / SwiftLint

Trailing Comma Violation: Collection literals should not have trailing commas (trailing_comma)

Check warning on line 11 in Package.swift

View workflow job for this annotation

GitHub Actions / SwiftLint

Trailing Comma Violation: Collection literals should not have trailing commas (trailing_comma)
],
dependencies: [
.package(url: "https://github.com/realm/SwiftLintPlugins", from: "0.57.0"),

Check warning on line 14 in Package.swift

View workflow job for this annotation

GitHub Actions / SwiftLint

Trailing Comma Violation: Collection literals should not have trailing commas (trailing_comma)

Check warning on line 14 in Package.swift

View workflow job for this annotation

GitHub Actions / SwiftLint

Trailing Comma Violation: Collection literals should not have trailing commas (trailing_comma)
],
targets: [
.target(
name: "MHDomain",
dependencies: [
.product(name: "SwiftLintBuildToolPlugin", package: "SwiftLintPlugins")
]
),
.target(
name: "MHCore",
dependencies: [
.product(name: "SwiftLintBuildToolPlugin", package: "SwiftLintPlugins")
]
),
.target(
name: "MHData",
dependencies: [
.product(name: "SwiftLintBuildToolPlugin", package: "SwiftLintPlugins")
]
),
.target(
name: "MHFoundation",
dependencies: [
.product(name: "SwiftLintBuildToolPlugin", package: "SwiftLintPlugins")
]
),
.target(
name: "MHPresentation",
dependencies: [
.product(name: "SwiftLintBuildToolPlugin", package: "SwiftLintPlugins")
]
),
.target(
name: "MHApplication",
dependencies: [
.product(name: "SwiftLintBuildToolPlugin", package: "SwiftLintPlugins") // 플러그인 활성화
]
),

Check warning on line 52 in Package.swift

View workflow job for this annotation

GitHub Actions / SwiftLint

Trailing Comma Violation: Collection literals should not have trailing commas (trailing_comma)

Check warning on line 52 in Package.swift

View workflow job for this annotation

GitHub Actions / SwiftLint

Trailing Comma Violation: Collection literals should not have trailing commas (trailing_comma)
],
swiftLanguageVersions: [.v6]
)

Check warning on line 56 in Package.swift

View workflow job for this annotation

GitHub Actions / SwiftLint

Trailing Newline Violation: Files should have a single trailing newline (trailing_newline)

Check warning on line 56 in Package.swift

View workflow job for this annotation

GitHub Actions / SwiftLint

Trailing Newline Violation: Files should have a single trailing newline (trailing_newline)

0 comments on commit 9b3018d

Please sign in to comment.