Update Swift version on Github Actions too #26
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.9"] | |
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 |