Mgration iOS to SPM #1971
Workflow file for this run
This file contains hidden or 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: CI | |
| # This workflow is triggered on every push. | |
| # It runs the backend and frontend tests and uploads the coverage to Codecov. | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| workflow_dispatch: | |
| jobs: | |
| backend-and-frontend-tests: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v7.0.1 | |
| - name: Setup node | |
| uses: actions/setup-node@v7.0.0 | |
| with: | |
| node-version-file: IsraelHiking.Web/.nvmrc | |
| - name: Setup dotnet | |
| uses: actions/setup-dotnet@v6.0.0 | |
| with: | |
| dotnet-version: '10.0' | |
| - name: Run backend tests | |
| run: dotnet test Tests/IsraelHiking.API.Tests --logger "junit;LogFilePath=test-result.xml" /p:CollectCoverage=true /p:CoverletOutputFormat=lcov /p:Exclude="[IsraelHiking.Common]*" | |
| - name: Run frontend tests | |
| run: | | |
| cd IsraelHiking.Web | |
| npm ci | |
| npx playwright install --with-deps chromium | |
| npm run test-ci | |
| - name: Run lint | |
| run: | | |
| cd IsraelHiking.Web | |
| npx ng lint | |
| - name: Codecov upload | |
| if: always() | |
| uses: codecov/codecov-action@v7.0.0 | |
| with: | |
| files: ./Tests/IsraelHiking.API.Tests/coverage.info,./IsraelHiking.Web/coverage/lcov.info | |
| env: | |
| CODECOV_TOKEN: fc1bea1d-f43a-437e-84d3-baef07be7454 | |
| build-android: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v7.0.1 | |
| - name: Setup node | |
| uses: actions/setup-node@v7.0.0 | |
| with: | |
| node-version-file: IsraelHiking.Web/.nvmrc | |
| - name: Setup Java | |
| uses: actions/setup-java@v5.7.0 | |
| with: | |
| distribution: 'temurin' | |
| java-version: '21' | |
| - name: Setup Ruby | |
| uses: ruby/setup-ruby@v1 | |
| with: | |
| ruby-version: '3.4.1' | |
| working-directory: IsraelHiking.Web/android | |
| bundler-cache: true | |
| - name: Build UI and set version | |
| run: | | |
| cd IsraelHiking.Web | |
| npm ci | |
| npm run build:mobile -- --no-progress | |
| npx cap sync android | |
| - name: Build Android Release | |
| if: ${{ github.secret_source == 'Actions' }} | |
| run: | | |
| cd IsraelHiking.Web/android | |
| bundle exec fastlane build_aab | |
| env: | |
| STORE_PASSWORD: ${{ secrets.MAPEAK_STORE_PASSWORD }} | |
| PASSWORD: ${{ secrets.MAPEAK_PASSWORD }} | |
| KEYSTORE_PATH: ${{ github.workspace }}/IsraelHiking.Web/android/app/Mapeak.jks | |
| - name: Upload aab artifacts | |
| if: ${{ github.secret_source == 'Actions' }} | |
| uses: actions/upload-artifact@v7.0.1 | |
| with: | |
| name: Mapeak_signed_${{ needs.version.outputs.version_string }}.aab | |
| path: IsraelHiking.Web/android/app/build/outputs/bundle/release/app-release.aab | |
| build-docker: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v7.0.1 | |
| - name: Build Docker image | |
| run: | | |
| docker build . -t ghcr.io/israelhikingmap/website-mapeak | |
| build-ios: | |
| runs-on: macos-26 | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v7.0.1 | |
| - name: Setup node | |
| uses: actions/setup-node@v7.0.0 | |
| with: | |
| node-version-file: IsraelHiking.Web/.nvmrc | |
| - name: Setup Ruby | |
| uses: ruby/setup-ruby@v1 | |
| with: | |
| ruby-version: '3.4.1' | |
| working-directory: IsraelHiking.Web/ios/App | |
| bundler-cache: true | |
| - name: Set up Git to use PAT for private match repo | |
| run: | | |
| git config --global url."https://x-access-token:${{ secrets.FASTLANE_MATCH_PAT }}@github.com/IsraelHikingMap/fastlane-match".insteadOf "https://github.com/IsraelHikingMap/fastlane-match" | |
| - name: Build UI | |
| run: | | |
| cd IsraelHiking.Web | |
| npm ci | |
| npm run build:mobile -- --no-progress | |
| npx cap sync ios | |
| - name: Build iOS with signing | |
| if: ${{ github.secret_source == 'Actions' }} | |
| run: | | |
| cd IsraelHiking.Web/ios/App | |
| bundle exec fastlane build_ios | |
| env: | |
| MATCH_PASSWORD: ${{ secrets.PASSWORD }} | |
| - name: Upload ipa artifacts | |
| if: ${{ github.secret_source == 'Actions' }} | |
| uses: actions/upload-artifact@v7.0.1 | |
| with: | |
| name: Mapeak_signed_${{ needs.version.outputs.version_string }}.ipa | |
| path: IsraelHiking.Web/ios/App/App.ipa |