Skip to content

Commit

Permalink
AND-9484 Add matrix jobs.
Browse files Browse the repository at this point in the history
  • Loading branch information
Sateetas committed Dec 14, 2024
1 parent d5366f8 commit e93dc2e
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 86 deletions.
41 changes: 22 additions & 19 deletions .github/workflows/detekt.yml → .github/workflows/pr_check.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Detekt
name: PR check

on:
pull_request:
Expand All @@ -20,10 +20,13 @@ concurrency:
cancel-in-progress: true

jobs:
detekt:
name: Detekt
runs-on: [ self-hosted, ARM64, active-android ]
ci:
name: ${{ matrix.task }}
runs-on: [ self-hosted, ARM64, macOS, active-android ]
if: github.event.pull_request.draft == false
strategy:
matrix:
task: [Detekt, Test]
steps:
- name: Checkout
uses: actions/checkout@v3
Expand All @@ -35,7 +38,7 @@ jobs:
run: |
docker build --platform linux/arm64 -t tangem_ci_android_environment .
- name: Run detekt
- name: Run ${{ matrix.task }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_ACTOR: ${{ secrets.GITHUB_ACTOR }}
Expand All @@ -49,19 +52,19 @@ jobs:
-v ${{ github.workspace }}:/workspace \
tangem_ci_android_environment \
sh -c "
echo 'Running detekt...';
cd /workspace && fastlane detekt;
echo 'Running ${{ matrix.task }}...';
laneName=$(echo "${{ matrix.task }}" | awk '{print tolower(substr($0,1,1)) substr($0,2)}')
cd /workspace && fastlane "$laneName";
"
- name: Build notification
if: failure()
uses: adamkdean/simple-slack-notify@master
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_DVELOPMENT_ANDROID }}
with:
channel: '#development-android'
text: 'Detekt #${{ github.run_number }} failed'
color: 'danger'
fields: |
[{ "title": "Action URL", "value": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"}]
# - name: Build notification
# if: failure()
# uses: adamkdean/simple-slack-notify@master
# env:
# SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_DVELOPMENT_ANDROID }}
# with:
# channel: '#development-android'
# text: '${{ matrix.task }} #${{ github.run_number }} failed'
# color: 'danger'
# fields: |
# [{ "title": "Action URL", "value": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"}]
67 changes: 0 additions & 67 deletions .github/workflows/tests.yml

This file was deleted.

0 comments on commit e93dc2e

Please sign in to comment.