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 1fa8e8d
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 86 deletions.
44 changes: 25 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,33 +38,36 @@ 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 }}
BUNDLE_PATH: vendor/bundle
TASK: ${{ matrix.task }}
run: |
docker run --rm \
-e GITHUB_TOKEN \
-e GITHUB_ACTOR \
-e BUNDLE_PATH \
-e TASK \
-v ~/.gradle:/root/.gradle \
-v ${{ github.workspace }}:/workspace \
tangem_ci_android_environment \
sh -c "
echo 'Running detekt...';
cd /workspace && fastlane detekt;
echo "Running $TASK...";
laneName=$(echo "$TASK" | awk '{print tolower(substr($0,1,1)) substr($0,2)}')
echo "Running $laneName";
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 1fa8e8d

Please sign in to comment.