Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CONFIG: Update CI workflows #147

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions .github/workflows/ci-documentation-noop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Documentation CI

on:
pull_request:
branches:
- main
paths-ignore:
- ".github/workflows/ci-documentation.yml"
- "**/*.swift"
- "**/*.docc/**/*.md"

concurrency:
group: "ci-documentation-${{ github.head_ref || github.run_id }}"
cancel-in-progress: true

jobs:
build-documentation:
name: Build Documentation
runs-on: ubuntu-latest
steps:
- name: Build
run: 'echo "No build required"'
28 changes: 28 additions & 0 deletions .github/workflows/ci-documentation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Documentation CI

on:
pull_request:
branches:
- main
paths:
- ".github/workflows/ci-documentation.yml"
- "**/*.swift"
- "**/*.docc/**/*.md"
workflow_dispatch:

concurrency:
group: "ci-documentation-${{ github.head_ref || github.run_id }}"
cancel-in-progress: true

jobs:
build-documentation:
name: Build Documentation
runs-on: ubuntu-latest
env:
SWIFTCI_DOCC: 1
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Build
run: swift package generate-documentation --product TMDb
48 changes: 48 additions & 0 deletions .github/workflows/ci-noop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: CI

on:
push:
branches:
- main
paths-ignore:
- ".github/workflows/ci.yml"
- "**/*.swift"
pull_request:
branches:
- main
paths-ignore:
- ".github/workflows/ci.yml"
- "**/*.swift"

concurrency:
group: "ci-${{ github.head_ref || github.run_id }}"
cancel-in-progress: true

jobs:
build-test:
name: Build and Test
runs-on: ubuntu-latest
steps:
- name: Build
run: 'echo "No build required"'

build-and-test-platforms:
name: Build and Test (${{ matrix.name }})
runs-on: ubuntu-latest
continue-on-error: true
strategy:
matrix:
include:
- name: iOS
- name: watchOS
- name: tvOS
steps:
- name: Build
run: 'echo "No build required"'

build-test-linux:
name: Build and Test (Linux)
runs-on: ubuntu-latest
steps:
- name: Build
run: 'echo "No build required"'
18 changes: 6 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,15 @@ on:
push:
branches:
- main
paths:
- ".github/workflows/ci.yml"
- "**/*.swift"
pull_request:
branches:
- main
paths:
- ".github/workflows/ci.yml"
- "**/*.swift"
workflow_dispatch:

concurrency:
Expand Down Expand Up @@ -72,15 +78,3 @@ jobs:

- name: Build for Release
run: swift build -c release -Xswiftc -warnings-as-errors

build-documentation:
name: Build Documentation
runs-on: macos-13
env:
SWIFTCI_DOCC: 1
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Build
run: swift package generate-documentation --product TMDb
21 changes: 21 additions & 0 deletions .github/workflows/codeql-noop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: CodeQL

on:
pull_request:
branches:
- main
paths-ignore:
- ".github/workflows/codeql.yml"
- "**/*.swift"

concurrency:
group: "codeql-${{ github.head_ref || github.run_id }}"
cancel-in-progress: true

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
steps:
- name: Perform CodeQL Analysis
run: 'echo "No analysis required"'
31 changes: 17 additions & 14 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: "CodeQL"
name: CodeQL

on:
push:
Expand All @@ -7,6 +7,9 @@ on:
pull_request:
branches:
- main
paths:
- ".github/workflows/codeql.yml"
- "**/*.swift"
schedule:
# Every Sunday at 12am
- cron: '0 0 * * 0'
Expand All @@ -29,19 +32,19 @@ jobs:
contents: read
security-events: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Checkout
uses: actions/checkout@v4

- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: swift
config-file: ./.github/codeql/codeql-config.yml
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: swift
config-file: ./.github/codeql/codeql-config.yml

- name: Build
run: swift build --arch arm64 --build-tests
- name: Build
run: swift build --arch arm64 --build-tests

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
with:
category: "/language:swift"
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
with:
category: "/language:swift"
26 changes: 18 additions & 8 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
name: Documentation
name: Deploy Documentation

on:
push:
branches:
- main
paths:
- ".github/workflows/documentation.yml"
- "**/*.swift"
- "**/*.docc/**/*.md"
workflow_dispatch:

permissions:
Expand All @@ -20,12 +24,10 @@ env:
SWIFTCI_DOCC: 1

jobs:
deploy:
name: Deploy Documentation
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}documentation/tmdb
runs-on: macos-13
build:
name: Build
runs-on: ubuntu-latest
container: swift:5.9.2-jammy
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -46,7 +48,15 @@ jobs:
uses: actions/upload-pages-artifact@v3
with:
path: 'docs'


deploy:
name: Deploy
runs-on: ubuntu-latest
needs: build
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}documentation/tmdb
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
21 changes: 21 additions & 0 deletions .github/workflows/integration-noop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Integration

on:
pull_request:
branches:
- main
paths-ignore:
- ".github/workflows/integration.yml"
- "**/*.swift"

concurrency:
group: "integration-${{ github.head_ref || github.run_id }}"
cancel-in-progress: true

jobs:
integration-test:
name: Integration Test
runs-on: ubuntu-latest
steps:
- name: Test
run: 'echo "No test required"'
3 changes: 3 additions & 0 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ on:
pull_request:
branches:
- main
paths:
- ".github/workflows/integration.yml"
- "**/*.swift"
schedule:
# Every Sunday at 12am
- cron: '0 0 * * 0'
Expand Down
29 changes: 29 additions & 0 deletions .github/workflows/lint-markdown-noop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Lint Markdown

on:
push:
branches:
- main
paths-ignore:
- ".github/workflows/lint-markdown.yml"
- "README.md"
- "**/*.docc/**/*.md"
pull_request:
branches:
- main
paths-ignore:
- ".github/workflows/lint-markdown.yml"
- "README.md"
- "**/*.docc/**/*.md"

concurrency:
group: "lint-markdown-${{ github.head_ref || github.run_id }}"
cancel-in-progress: true

jobs:
markdownlint:
name: Markdownlint
runs-on: ubuntu-latest
steps:
- name: Lint
run: 'echo "No linting required"'
38 changes: 38 additions & 0 deletions .github/workflows/lint-markdown.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Lint

on:
push:
branches:
- main
paths:
- ".github/workflows/lint-markdown.yml"
- "README.md"
- "**/*.docc/**/*.md"
pull_request:
branches:
- main
paths:
- ".github/workflows/lint-markdown.yml"
- "README.md"
- "**/*.docc/**/*.md"
workflow_dispatch:

concurrency:
group: "lint-markdown-${{ github.head_ref || github.run_id }}"
cancel-in-progress: true

jobs:
markdownlint:
name: Markdownlint
runs-on: ubuntu-latest
container:
image: docker://ghcr.io/igorshubovych/markdownlint-cli:latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Lint README
run: markdownlint "README.md"

- name: Lint DocC files
run: markdownlint "**/*.docc/**/*.md"
34 changes: 34 additions & 0 deletions .github/workflows/lint-noop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Lint

on:
push:
branches:
- main
paths-ignore:
- ".github/workflows/lint.yml"
- "**/*.swift"
pull_request:
branches:
- main
paths-ignore:
- ".github/workflows/lint.yml"
- "**/*.swift"

concurrency:
group: "lint-${{ github.head_ref || github.run_id }}"
cancel-in-progress: true

jobs:
swiftlint:
name: Swiftlint
runs-on: ubuntu-latest
steps:
- name: Swiftlint
run: 'echo "No linting required"'

swiftformat:
name: SwiftFormat
runs-on: ubuntu-latest
steps:
- name: SwiftFormat
run: 'echo "No linting required"'
Loading
Loading