Files
letro-ios/.github/workflows/unit_tests.yml
Mauro 2a4160774e Prefire basic implementation (#1743)
* prefire basic implementation

force the unit tests to run on iPhone 14

skipping plugin validation

archive artifacts

better workflow

removed the OS restriction

lfs

custom stencil

new test file

deleting

* git lfs

* lfs

* test

* customised the stencil to support our internal protocol

* for now we can remove the OS check from the stencil

* added a delay

* tests have been moved

* improvement

* recommit

* perceptual precision lowered

* updated snapshot testing and selected also iOS version

* added ios version control
2023-09-20 14:07:18 +02:00

59 lines
1.6 KiB
YAML

name: Unit Tests
on:
workflow_dispatch:
push:
branches: [ develop ]
pull_request:
jobs:
tests:
name: Tests
runs-on: macos-13
concurrency:
# When running on develop, use the sha to allow all runs of this workflow to run concurrently.
# Otherwise only allow a single run of this workflow on each branch, automatically cancelling older runs.
group: ${{ github.ref == 'refs/heads/develop' && format('unit-tests-develop-{0}', github.sha) || format('unit-tests-{0}', github.ref) }}
cancel-in-progress: true
steps:
- uses: nschloe/action-cached-lfs-checkout@v1.2.1
with:
ref: ${{ github.event.pull_request.head.sha }}
- uses: actions/cache@v3
with:
path: vendor/bundle
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
restore-keys: |
${{ runner.os }}-gems-
- name: Setup environment
run:
source ci_scripts/ci_common.sh && setup_github_actions_environment
- name: SwiftFormat
run:
swiftformat --lint .
- name: Run tests
run: bundle exec fastlane unit_tests
- name: Archive artifacts
uses: actions/upload-artifact@v3
# We only care about artifcats if the tests fail
if: failure()
with:
name: test-output
path: fastlane/test_output
retention-days: 1
if-no-files-found: ignore
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
flags: unittests