Skip to content

Commit

Permalink
Added workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
Kyome22 committed Apr 17, 2024
1 parent c5e5de3 commit ab57542
Show file tree
Hide file tree
Showing 2 changed files with 91 additions and 0 deletions.
53 changes: 53 additions & 0 deletions .github/workflows/deploy_docc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Deploy DocC

on:
workflow_dispatch:
push:
branches:
- main
paths-ignore:
- README.md
- .gitignore

concurrency:
group: "pages"
cancel-in-progress: true

jobs:
build:
runs-on: macos-14
env:
DEVELOPER_DIR: /Applications/Xcode_15.2.app/Contents/Developer

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Build DocC
run: |
swift package --allow-writing-to-directory ./docs \
generate-documentation \
--target WebUI \
--disable-indexing \
--transform-for-static-hosting \
--output-path ./docs
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: docs

deploy:
runs-on: ubuntu-latest
needs: build
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
38 changes: 38 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Test

on:
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
unit_test:
name: Unit Test
runs-on: macos-14
env:
DEVELOPER_DIR: "/Applications/Xcode_15.1.app/Contents/Developer"
timeout-minutes: 30

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Show Xcode Version
run: xcodebuild -version

- name: Run Tests
run: |
xcodebuild test \
-project Examples/Examples.xcodeproj \
-scheme Examples \
-destination "platform=iOS Simulator,name=iPhone 15,OS=17.2" \
-resultBundlePath TestResults/result_bundle
- name: Archive test results
if: success() || failure()
uses: kishikawakatsumi/xcresulttool@2b37f116695328d5e503ac8dadca0f1545a51da4 #v1.7.1
with:
path: TestResults/result_bundle.xcresult
show-passed-tests: false

0 comments on commit ab57542

Please sign in to comment.