<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Spiros Gerokostas on Medium]]></title>
        <description><![CDATA[Stories by Spiros Gerokostas on Medium]]></description>
        <link>https://medium.com/@spiros.gerokostas?source=rss-1f6400afc333------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/2*fWaH9NtFid23TWBfVyg-9w.jpeg</url>
            <title>Stories by Spiros Gerokostas on Medium</title>
            <link>https://medium.com/@spiros.gerokostas?source=rss-1f6400afc333------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 01 Dec 2026 00:54:23 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@spiros.gerokostas/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[GitHub Actions for swift projects]]></title>
            <link>https://medium.com/@spiros.gerokostas/github-actions-for-swift-projects-111f595b87d9?source=rss-1f6400afc333------2</link>
            <guid isPermaLink="false">https://medium.com/p/111f595b87d9</guid>
            <category><![CDATA[xcode]]></category>
            <category><![CDATA[github-actions]]></category>
            <category><![CDATA[ios]]></category>
            <category><![CDATA[swift]]></category>
            <dc:creator><![CDATA[Spiros Gerokostas]]></dc:creator>
            <pubDate>Wed, 25 Mar 2020 10:46:46 GMT</pubDate>
            <atom:updated>2020-03-25T10:46:46.220Z</atom:updated>
            <content:encoded><![CDATA[<h3>GitHub Actions for iOS projects</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ANoMt-WpQRayZGITk_7Wzw.png" /></figure><p>In this article, I’m going to describe how to add <strong>CI/CD</strong> (<a href="https://en.wikipedia.org/wiki/Continuous_integration">continuous integration</a>/<a href="https://en.wikipedia.org/wiki/Continuous_delivery">continuous delivery</a>) with GitHub Actions for your iOS projects to automate your workflow.</p><h3><strong>Configuration file</strong></h3><p>The first thing that we have to do is to create a <strong>YAML</strong> file in the root directory of your repository:</p><pre>.github/workflows/ci.yml</pre><p>Github also can generate this file for you by selecting the tab <strong>Actions</strong> and press <strong>Setup up a workflow yourself</strong> button.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eSKvpu0emUWirjgWId7-Ew.png" /></figure><h3><strong>Workflow</strong></h3><p>The basic workflow look like this:</p><pre>name: CI<br>on:<br> pull_request:<br> push:<br>   branches:<br>     - develop<br>     - feature/*<br>     - master</pre><p>You can select to trigger the CI workflow on pull request or every time you push some code to your repository, also, you can add the name of the branches. In this example CI will be triggered on develop, master and feature branches on every pull request and push.</p><h3><strong>Jobs</strong></h3><p>A workflow consists of one or many jobs. For example, we can have one job for the linter and one job for running tests and another for fetching the dependencies. A job contains a list of tasks that are called steps. Jobs can run at the same time in parallel or run sequentially but steps always run sequentially. To run jobs sequentially we must use the <strong>needs </strong>property a job also must have a unique<strong> id</strong> <strong>needs</strong> property identifies any job that must be completed successfully before a new job will start.</p><pre>jobs:<br>  lint:<br>  test:<br>    needs: lint<br>  build:<br>    needs: [lint, test]</pre><p>In this example, <strong>lint</strong> job must complete successfully before <strong>test</strong> begins, and <strong>build</strong> job waits for both <strong>lint</strong> and <strong>test</strong> to complete.</p><p>Let’s add a <strong>test</strong> job for running the unit tests of our project:</p><pre>jobs:<br> test:<br> name: Test<br> runs-on: macOS-latest<br> strategy:<br>     matrix:<br>       destination: [&#39;platform=iOS Simulator,OS=13.3,name=iPhone 11&#39;]<br> steps:<br>   - name: Checkout<br>     uses: actions/checkout@master<br>   - name: Select Xcode 11.3<br>     run: sudo xcode-select -s /Applications/Xcode_11.3.app<br>   - name: Run tests<br>     run: |<br>       xcodebuild clean test -project HelloWorld.xcodeproj -scheme HelloWorld -destination &quot;${destination}&quot; CODE_SIGN_IDENTITY=&quot;&quot; CODE_SIGNING_REQUIRED=NO ONLY_ACTIVE_ARCH=NO<br>       bash &lt;(curl -s https://codecov.io/bash)<br>     env: <br>      destination: ${{ matrix.destination }}</pre><p>In our case, we are going to run the job on the macOS-latest environment. We can select also the Xcode version. A strategy creates a build matrix for your jobs. For example, we want to run unit tests on multiple simulators the following matrix will create 2 jobs one for the <strong>iPhone 11</strong> and one for the <strong>iPhone X</strong>.</p><pre>strategy:<br>  matrix:<br>    destination: [‘platform=iOS Simulator,OS=13.3,name=iPhone 11’, <br> ‘platform=iOS Simulator,OS=13.3,name=iPhone X’]</pre><p>Now we can pass the destination environment variable to the xcodebuild command.</p><h3><strong>Final ci.yml</strong></h3><pre>name: CI<br>on:<br> pull_request:<br> push:<br>   branches:<br>     — develop<br>     — feature/*<br>     — master</pre><pre>jobs:<br> test:<br>   name: Test<br>   runs-on: macOS-latest<br>   strategy:<br>       matrix:<br>         destination: [&#39;platform=iOS Simulator,OS=13.3,name=iPhone 11&#39;]<br>   steps:<br>     — name: Checkout<br>       uses: actions/checkout@master<br>     — name: Select Xcode 11.3<br>       run: sudo xcode-select -s /Applications/Xcode_11.3.app<br>     — name: Run tests<br>       run: |<br>         xcodebuild clean test -project HelloWorld.xcodeproj -scheme  HelloWorld -destination &quot;${destination}&quot; CODE_SIGN_IDENTITY=”” CODE_SIGNING_REQUIRED=NO ONLY_ACTIVE_ARCH=NO<br>         bash &lt;(curl -s <a href="https://codecov.io/bash">https://codecov.io/bash</a>)<br>       env: <br>        destination: ${{ matrix.destination }}</pre><p>So every time we are opening a new pull request GitHub will display the status of the jobs on the bottom of the page:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/751/1*F6L8BLdBAC70NTcj8FMisA.png" /></figure><p>or we can go to <strong>Actions</strong> tab and check the status of the workflow:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-8Ndbe91cAeiffsnMP4f4A.png" /></figure><p>One last step we can generate a <a href="https://help.github.com/en/actions/configuring-and-managing-workflows/configuring-a-workflow#adding-a-workflow-status-badge-to-your-repository"><strong>status badge Markdown</strong></a><strong> </strong>for our ios project.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8Gm6rKvPC2q9qGYPWMLGQg.png" /></figure><p>And that’s everything for today!</p><p>We can add more jobs for example integrate with <a href="https://github.com/danger/swift">danger-swift</a> or upload the application to <a href="https://developer.apple.com/testflight/">TestFlight</a> or generate an ipa file.</p><p><em>You liked this article and you want to see more content like it? Feel free to follow me on Twitter: </em><a href="https://twitter.com/sger"><em>https://twitter.com/sger</em></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=111f595b87d9" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>