Reputation: 14063
# This is a basic workflow to help you get started with Actions
name: CI
# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events but only for the main branch
push:
#branches: [ main ]
pull_request:
branches: [ main ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: macos-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- run: |
pwd
swift package init --type library
xcodebuild clean
xcodebuild test -project TimeFountain.xcodeproj -scheme TimeFountain CODE_SIGN_ENTITLEMENTS= DEVELOPMENT_TEAM= CODE_SIGNING_ALLOWED=NO
The problem is that it isn't accessing the AlamoFire Swift Package which I committed into the project. The error I'm getting is:
...
error: no such module 'Alamofire'
1499
import Alamofire
1500
^
1501
1502
CompileSwift normal x86_64
...
Error: Process completed with exit code 65.
Upvotes: 2
Views: 841
Reputation: 14063
The problem is: test -project TimeFountain.xcodeproj
, I changed it to use the workspace.
# This is a basic workflow to help you get started with Actions
name: CI
on:
pull_request:
branches:
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: macos-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- run: |
pwd
swift package init --type library
xcodebuild clean
xcodebuild test -workspace TimeFountain.xcworkspace -scheme TimeFountain CODE_SIGN_ENTITLEMENTS= DEVELOPMENT_TEAM= CODE_SIGNING_ALLOWED=NO
Upvotes: 1