Skip to content

Merge pull request #1059 from tchapgouv/1056-des-messages-en-reponses… #922

Merge pull request #1059 from tchapgouv/1056-des-messages-en-reponses…

Merge pull request #1059 from tchapgouv/1056-des-messages-en-reponses… #922

Workflow file for this run

name: Tests CI
on:
# Triggers the workflow on any pull request and push to develop
push:
branches: [ develop ]
pull_request:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
env:
# Make the git branch for a PR available to our Fastfile
MX_GIT_BRANCH: ${{ github.event.pull_request.head.ref }}
jobs:
tests:
name: Tests
runs-on: macos-14
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('tests-develop-{0}', github.sha) || format('tests-{0}', github.ref) }}
cancel-in-progress: true
steps:
- uses: actions/checkout@v2
# Common cache
# Note: GH actions do not support yaml anchor yet. We need to duplicate this for every job
- uses: actions/cache@v2
with:
path: Pods
key: ${{ runner.os }}-pods-${{ hashFiles('**/Podfile.lock') }}
restore-keys: |
${{ runner.os }}-pods-
- uses: actions/cache@v2
with:
path: vendor/bundle
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
restore-keys: |
${{ runner.os }}-gems-
# Make sure we use the latest version of MatrixSDK
- name: Reset MatrixSDK pod
run: rm -rf Pods/MatrixSDK
# Common setup
# Note: GH actions do not support yaml anchor yet. We need to duplicate this for every job
- name: Brew bundle
run: brew bundle
- name: Bundle install
run: |
bundle config path vendor/bundle
bundle install --jobs 4 --retry 3
# Disabled for Tchap to avoid MatrixSDK version reset on the main branch (develop), instead of using the DINUM specific one.
# - name: Use right MatrixSDK versions
# run: bundle exec fastlane point_dependencies_to_related_branches
# Main step
- name: Unit tests
run: bundle exec fastlane test
# - name: Upload coverage to Codecov
# uses: codecov/codecov-action@v3
# with:
# flags: unittests