diff --git a/.github/workflows/sonar_analysis.yml b/.github/workflows/sonar_analysis.yml index 78f05c6..858d5ca 100644 --- a/.github/workflows/sonar_analysis.yml +++ b/.github/workflows/sonar_analysis.yml @@ -3,22 +3,42 @@ name: CI on: pull_request: types: [opened, edited, reopened, synchronize] + workflow_dispatch: + env: GH_TOKEN: ${{ secrets.GIT_TOKEN_SECRET }} OWNER: ${{ github.repository_owner }} REPO: ${{ github.event.repository.name }} PR_NUMBER: ${{ github.event.number }} - workflow_dispatch: - jobs: build: runs-on: macOS-latest steps: + # Checkout do repositório - uses: actions/checkout@v3 + # Configurar Ruby para CocoaPods + - name: Set up Ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: '3.2' # Ajuste conforme necessário + + # Instalar CocoaPods e dependências + - name: Install CocoaPods + run: | + gem install cocoapods + pod install --project-directory=Example + + # Listar arquivos para depuração + - name: List files + run: ls -la Example + + # Executar testes - name: Test run: | - ls -la - xcodebuild -workspace Example/TrustlySDK.xcworkspace -scheme TrustlySDK-Example -destination 'platform=iOS Simulator,name=iPhone 15,OS=17.4' test \ No newline at end of file + xcodebuild -workspace Example/TrustlySDK.xcworkspace \ + -scheme TrustlySDK-Example \ + -destination 'platform=iOS Simulator,name=iPhone 15,OS=17.4' \ + test \ No newline at end of file