Skip to content

Update Swift version and Swiftlint #25

Update Swift version and Swiftlint

Update Swift version and Swiftlint #25

Workflow file for this run

name: Swift
on:
push:
branches: [ develop, master ]
pull_request:
branches: [ develop, master ]
jobs:
build:
name: Swift on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
swift: ["5.7"]
steps:
- uses: swift-actions/setup-swift@v1
with:
swift-version: ${{ matrix.swift }}
- name: Get swift version
run: swift --version
- name: Cache Mint
if: ${{ matrix.os == 'macos-latest' }}
id: cache-mint
uses: actions/cache@v3
with:
path: ~/mint
key: ${{ runner.os }}-mint-${{ hashFiles('**/Mintfile') }}
restore-keys: ${{ runner.os }}-mint-
- uses: actions/checkout@v2
- name: Install Dependencies (Mac only)
if: ${{ matrix.os == 'macos-latest' && steps.cache-npm.outputs.cache-hit != 'true' }}
env:
MINT_PATH: '~/mint'
run: |
brew install mint
mint bootstrap
- name: SwiftLint (Mac only)
if: ${{ matrix.os == 'macos-latest' }}
env:
MINT_PATH: '~/mint'
run: make lint-check
- name: Run tests (Linux)
if: ${{ matrix.os == 'ubuntu-latest' }}
env:
LC_CTYPE: 'en_US.UTF-8'
LANG: 'en_US.UTF-8'
FRAMEWORK_NAME: 'Reducer'
run: |
make test
- name: Run tests (Mac)
if: ${{ matrix.os == 'macos-latest' }}
env:
LC_CTYPE: 'en_US.UTF-8'
LANG: 'en_US.UTF-8'
FRAMEWORK_NAME: 'Reducer'
MINT_PATH: '~/mint'
run: |
make test
make code-coverage-summary
make code-coverage-file
bash <(curl -s https://codecov.io/bash) -X xcodellvm -X gcov -f coverage.txt