RMET-3975 - Setup Actions to run unit tests and release the library #23
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: Run Unit Tests | |
on: | |
workflow_dispatch: | |
push: | |
branches: [ main, development ] | |
pull_request: | |
branches: [ main, development ] | |
jobs: | |
test: | |
name: Unit-Tests | |
runs-on: macos-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Java | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'zulu' | |
java-version: '17' | |
- name: Bundle Install | |
run: bundle install | |
- name: Unit tests | |
run: bundle exec fastlane test | |
- name: Code Coverage | |
run: bundle exec fastlane coverage | |
# Commenting Sonarqube steps for now, until we are able to configure Sonarqube in Ionic repos | |
#- name: Setup sonarqube | |
# uses: warchant/setup-sonar-scanner@v8 | |
#- name: Send to Sonarcloud | |
# run: bundle exec fastlane sonarqube | |
# env: | |
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
# SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} |