Skip to content

[#154] Add UI-based unit tests for demo application #132

[#154] Add UI-based unit tests for demo application

[#154] Add UI-based unit tests for demo application #132

#
# Software Name: Orange Unified Design System
# SPDX-FileCopyrightText: Copyright (c) Orange SA
# SPDX-License-Identifier: MIT
#
# This software is distributed under the MIT license,
# the text of which is available at https://opensource.org/license/MIT/
# or see the "LICENSE" file for more details.
#
# Authors: See CONTRIBUTORS.txt
# Software description: A SwiftUI components library with code examples for Orange Unified Design System
#
# About runners: https://docs.github.com/en/actions/using-github-hosted-runners/using-github-hosted-runners/about-github-hosted-runners
# Runners details: https://github.com/actions/runner-images/tree/main/images/macos
name: Build and Test
on:
# For protected and most important branches
push:
branches:
- main
- develop
# To trigger manually
workflow_dispatch:
# Pull request events
pull_request:
types:
- opened
- synchronize
jobs:
# Build the app (if there are linter errors or compiler issues, it will fail)
build:
runs-on: macos-15
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Xcode 16
run: |
sudo xcode-select -s /Applications/Xcode_16.app/Contents/Developer
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.3'
- name: Install Fastlane
run: |
bundle install
- name: Build demo app
run: |
cd Showcase
bundle exec fastlane buildDebugApp
# Test the library with unit tests
test:
runs-on: macos-15
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Xcode 16
run: |
sudo xcode-select -s /Applications/Xcode_16.app/Contents/Developer
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.3'
- name: Install Fastlane
run: |
bundle install
- name: Run unit tests on demo app
run: |
cd Showcase
bundle exec pod install
bundle exec fastlane ios test