diff --git a/.github/workflows/CI-pull-request.yml b/.github/workflows/CI-pull-request.yml new file mode 100644 index 0000000..4c06234 --- /dev/null +++ b/.github/workflows/CI-pull-request.yml @@ -0,0 +1,16 @@ +name: CI - Pull Request +on: + pull_request: + branches: + - 'main' + workflow_dispatch: +jobs: + swiftlint: + name: SwiftLint + uses: ./.github/workflows/swiftlint.yml + secrets: inherit + test: + name: Testing CodeEditKit + needs: swiftlint + uses: ./.github/workflows/tests.yml + secrets: inherit diff --git a/.github/workflows/CI-push.yml b/.github/workflows/CI-push.yml new file mode 100644 index 0000000..43cd286 --- /dev/null +++ b/.github/workflows/CI-push.yml @@ -0,0 +1,21 @@ +name: CI - Push to main +on: + push: + branches: + - 'main' + workflow_dispatch: +jobs: + swiftlint: + name: SwiftLint + uses: ./.github/workflows/swiftlint.yml + secrets: inherit + test: + name: Testing CodeEditKit + needs: swiftlint + uses: ./.github/workflows/tests.yml + secrets: inherit + build_documentation: + name: Build Documentation + needs: [swiftlint, test] + uses: ./.github/workflows/build-documentation.yml + secrets: inherit diff --git a/.github/workflows/build-documentation.yml b/.github/workflows/build-documentation.yml index 89c448d..d020396 100644 --- a/.github/workflows/build-documentation.yml +++ b/.github/workflows/build-documentation.yml @@ -1,17 +1,13 @@ name: build-documentation -on: - push: - branches: - - 'main' - paths: - - 'Sources/**' +on: workflow_dispatch: + workflow_call: jobs: build-docc: runs-on: [self-hosted, macOS] steps: - name: Checkout repository - uses: actions/checkout@v1 + uses: actions/checkout@v3 - name: Build Documentation run: exec ./.github/scripts/build-docc.sh - name: Init new repo in dist folder and commit generated files diff --git a/.github/workflows/swiftlint.yml b/.github/workflows/swiftlint.yml index 08a846f..a802661 100644 --- a/.github/workflows/swiftlint.yml +++ b/.github/workflows/swiftlint.yml @@ -1,26 +1,11 @@ name: SwiftLint on: - push: - branches: - - 'main' - paths: - - '.github/workflows/swiftlint.yml' - - '.swiftlint.yml' - - '**/*.swift' - pull_request: - branches: - - 'main' - paths: - - '.github/workflows/swiftlint.yml' - - '.swiftlint.yml' - - '**/*.swift' + workflow_dispatch: + workflow_call: jobs: SwiftLint: runs-on: [self-hosted, macOS] steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v3 - name: GitHub Action for SwiftLint with --strict run: swiftlint --strict - # uses: norio-nomura/action-swiftlint@3.2.1 - # with: - # args: --strict diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 1139852..27c3180 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -1,20 +1,13 @@ name: tests on: - push: - branches: - - 'main' - paths: - - 'Sources/**' - - 'Tests/**' - pull_request: - branches: - - 'main' + workflow_dispatch: + workflow_call: jobs: code-edit-kit-tests: name: Testing CodeEditKit runs-on: [self-hosted, macOS] steps: - name: Checkout repository - uses: actions/checkout@v1 + uses: actions/checkout@v3 - name: Testing Package run: exec ./.github/scripts/tests.sh arm