diff --git a/.github/workflows/accessibility-tests.yml b/.github/workflows/accessibility-tests.yml index 001ecd88b..273f6186e 100644 --- a/.github/workflows/accessibility-tests.yml +++ b/.github/workflows/accessibility-tests.yml @@ -4,7 +4,7 @@ on: workflow_dispatch: schedule: - - cron: '0 2 * * 1-5' + - cron: "0 2 * * 1-5" permissions: {} diff --git a/.github/workflows/automatic-calendar-version.yml b/.github/workflows/automatic-calendar-version.yml index 36881f6a4..1f3248878 100644 --- a/.github/workflows/automatic-calendar-version.yml +++ b/.github/workflows/automatic-calendar-version.yml @@ -1,10 +1,10 @@ -name: Automatic Calendar Version +name: Automatic Calendar Version on: schedule: # At 03:00 UTC every Tuesday in preparation for an RC. # The tool assumes the release is published in 6-days (the following Monday). # Note: Most of these runs will be no-op until the release month changes. - - cron: '0 3 * * 2' + - cron: "0 3 * * 2" workflow_dispatch: permissions: {} @@ -15,7 +15,7 @@ jobs: automatic-calendar-version: runs-on: macos-26 timeout-minutes: 15 - + # Skip in forks if: github.repository == 'element-hq/element-x-ios' steps: @@ -25,8 +25,7 @@ jobs: persist-credentials: false - name: Setup environment - run: - source ci_scripts/ci_common.sh && setup_github_actions_environment + run: source ci_scripts/ci_common.sh && setup_github_actions_environment - name: Bump the CalVer if needed run: swift run -q tools bump-calendar-version diff --git a/.github/workflows/compound-ios.yml b/.github/workflows/compound-ios.yml index 956f91013..46090f58f 100644 --- a/.github/workflows/compound-ios.yml +++ b/.github/workflows/compound-ios.yml @@ -7,20 +7,19 @@ on: workflow_dispatch: push: - branches: [ develop ] + branches: [develop] paths: - - 'compound-ios/**' - + - "compound-ios/**" + pull_request: types: [opened, synchronize, reopened] paths: - - 'compound-ios/**' + - "compound-ios/**" permissions: {} jobs: tests: - runs-on: macos-26 timeout-minutes: 15 @@ -31,47 +30,46 @@ jobs: cancel-in-progress: true steps: - - uses: nschloe/action-cached-lfs-checkout@385a8ecc719e50b8c71af6ab01a624b486b7c3bc # v1.2.5 - with: - persist-credentials: false + - uses: nschloe/action-cached-lfs-checkout@385a8ecc719e50b8c71af6ab01a624b486b7c3bc # v1.2.5 + with: + persist-credentials: false - - name: Configure Xcode 26 - run: sudo xcode-select -s /Applications/Xcode_26.4.app - - - name: Install sourcery - run: brew install sourcery - - - name: Generate preview tests - working-directory: compound-ios - run: sourcery --config Tools/Sourcery/PreviewTestsConfig.yml + - name: Configure Xcode 26 + run: sudo xcode-select -s /Applications/Xcode_26.4.app - - name: Create simulator - run: xcrun simctl create "Snapshots" "iPhone SE (3rd generation)" "com.apple.CoreSimulator.SimRuntime.iOS-26-4" + - name: Install sourcery + run: brew install sourcery - - name: Run tests - working-directory: compound-ios - run: set -o pipefail && xcodebuild test -scheme 'Compound' -sdk iphonesimulator -destination 'platform=iOS Simulator,name=Snapshots,OS=26.4' -skipPackagePluginValidation -resultBundlePath Logs/CompoundTests.xcresult | xcbeautify --renderer github-actions + - name: Generate preview tests + working-directory: compound-ios + run: sourcery --config Tools/Sourcery/PreviewTestsConfig.yml - - name: Zip artifacts - if: failure() # We only care about artefacts if the tests fail - working-directory: compound-ios - run: zip -r Logs/CompoundTests.xcresult.zip Logs/CompoundTests.xcresult/ + - name: Create simulator + run: xcrun simctl create "Snapshots" "iPhone SE (3rd generation)" "com.apple.CoreSimulator.SimRuntime.iOS-26-4" - - name: Archive artifacts - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 - if: failure() # We only care about artefacts if the tests fail - with: - name: test-results - path: compound-ios/Logs/CompoundTests.xcresult.zip - retention-days: 1 - if-no-files-found: ignore + - name: Run tests + working-directory: compound-ios + run: set -o pipefail && xcodebuild test -scheme 'Compound' -sdk iphonesimulator -destination 'platform=iOS Simulator,name=Snapshots,OS=26.4' -skipPackagePluginValidation -resultBundlePath Logs/CompoundTests.xcresult | xcbeautify --renderer github-actions - - name: Upload coverage to Codecov - uses: codecov/codecov-action@57e3a136b779b570ffcdbf80b3bdc90e7fab3de2 # v6.0.0 - with: - fail_ci_if_error: false - token: ${{ secrets.CODECOV_TOKEN }} - xcode: true - xcode_archive_path: compound-ios/Logs/CompoundTests.xcresult - flags: compound - + - name: Zip artifacts + if: failure() # We only care about artefacts if the tests fail + working-directory: compound-ios + run: zip -r Logs/CompoundTests.xcresult.zip Logs/CompoundTests.xcresult/ + + - name: Archive artifacts + uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 + if: failure() # We only care about artefacts if the tests fail + with: + name: test-results + path: compound-ios/Logs/CompoundTests.xcresult.zip + retention-days: 1 + if-no-files-found: ignore + + - name: Upload coverage to Codecov + uses: codecov/codecov-action@57e3a136b779b570ffcdbf80b3bdc90e7fab3de2 # v6.0.0 + with: + fail_ci_if_error: false + token: ${{ secrets.CODECOV_TOKEN }} + xcode: true + xcode_archive_path: compound-ios/Logs/CompoundTests.xcresult + flags: compound diff --git a/.github/workflows/danger.yml b/.github/workflows/danger.yml index 4c4349fcc..b970a1885 100644 --- a/.github/workflows/danger.yml +++ b/.github/workflows/danger.yml @@ -2,7 +2,7 @@ name: Danger CI on: pull_request: - types: [ labeled, synchronize, opened, reopened ] + types: [labeled, synchronize, opened, reopened] permissions: {} diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index 0cacc230c..b1ddb4a97 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -2,8 +2,8 @@ name: Integration tests on: schedule: - - cron: '0 2 * * 1-5' - + - cron: "0 2 * * 1-5" + workflow_dispatch: permissions: {} @@ -25,8 +25,7 @@ jobs: persist-credentials: false - name: Setup environment - run: - source ci_scripts/ci_common.sh && setup_github_actions_environment + run: source ci_scripts/ci_common.sh && setup_github_actions_environment - name: Run tests run: swift run -q tools ci integration-tests diff --git a/.github/workflows/post-release.yml b/.github/workflows/post-release.yml index 778145e8a..87fa6232f 100644 --- a/.github/workflows/post-release.yml +++ b/.github/workflows/post-release.yml @@ -3,7 +3,7 @@ name: Post-release on: push: tags: - - 'release/**' + - "release/**" permissions: {} diff --git a/.github/workflows/record-snapshots.yml b/.github/workflows/record-snapshots.yml index f3115f4b6..24ffb9bc0 100644 --- a/.github/workflows/record-snapshots.yml +++ b/.github/workflows/record-snapshots.yml @@ -15,7 +15,7 @@ jobs: if: > github.event.label.name == 'record-snapshots' && - github.event.pull_request.head.repo.full_name == github.repository + github.event.pull_request.head.repo.full_name == github.repository permissions: contents: write diff --git a/.github/workflows/translations-pr.yml b/.github/workflows/translations-pr.yml index a361f9ab4..5b20753da 100644 --- a/.github/workflows/translations-pr.yml +++ b/.github/workflows/translations-pr.yml @@ -2,7 +2,7 @@ name: Open Translations PR on: schedule: # At 03:00 on every Monday UTC - - cron: '0 3 * * 1' + - cron: "0 3 * * 1" workflow_dispatch: permissions: {} @@ -11,7 +11,7 @@ jobs: open-translations-pr: runs-on: macos-26 timeout-minutes: 15 - + # Skip in forks if: github.repository == 'element-hq/element-x-ios' steps: @@ -21,15 +21,14 @@ jobs: persist-credentials: false - name: Setup environment - run: - source ci_scripts/ci_common.sh && setup_github_actions_translations_environment + run: source ci_scripts/ci_common.sh && setup_github_actions_translations_environment - name: Download All Translations run: swift run -q tools download-strings --all-languages - name: Verify Translations run: swift run -q tools locheck - + - name: SAS Translations run: swift run -q tools generate-sas diff --git a/.github/workflows/triage-incoming.yml b/.github/workflows/triage-incoming.yml index 265e0f3fa..53514a4c9 100644 --- a/.github/workflows/triage-incoming.yml +++ b/.github/workflows/triage-incoming.yml @@ -12,10 +12,10 @@ jobs: if: > github.repository == 'element-hq/element-x-ios' steps: - - uses: actions/add-to-project@244f685bbc3b7adfa8466e08b698b5577571133e # v1.0.2 - with: - project-url: https://github.com/orgs/element-hq/projects/81 - github-token: ${{ secrets.ELEMENT_BOT_TOKEN }} + - uses: actions/add-to-project@244f685bbc3b7adfa8466e08b698b5577571133e # v1.0.2 + with: + project-url: https://github.com/orgs/element-hq/projects/81 + github-token: ${{ secrets.ELEMENT_BOT_TOKEN }} move_element_x_issues: name: ElementX issues to ElementX project board @@ -24,7 +24,7 @@ jobs: if: > github.repository == 'element-hq/element-x-ios' steps: - - uses: actions/add-to-project@244f685bbc3b7adfa8466e08b698b5577571133e # v1.0.2 - with: - project-url: https://github.com/orgs/element-hq/projects/43 - github-token: ${{ secrets.ELEMENT_BOT_TOKEN }} + - uses: actions/add-to-project@244f685bbc3b7adfa8466e08b698b5577571133e # v1.0.2 + with: + project-url: https://github.com/orgs/element-hq/projects/43 + github-token: ${{ secrets.ELEMENT_BOT_TOKEN }} diff --git a/.github/workflows/ui-tests.yml b/.github/workflows/ui-tests.yml index 2b9911605..81142ef59 100644 --- a/.github/workflows/ui-tests.yml +++ b/.github/workflows/ui-tests.yml @@ -8,7 +8,7 @@ on: required: false schedule: - - cron: '0 2 * * 1-5' + - cron: "0 2 * * 1-5" permissions: {} diff --git a/.github/workflows/unit-tests-enterprise.yml b/.github/workflows/unit-tests-enterprise.yml index 9bc1687ec..d0ad10e7d 100644 --- a/.github/workflows/unit-tests-enterprise.yml +++ b/.github/workflows/unit-tests-enterprise.yml @@ -2,10 +2,10 @@ name: Unit Tests (Enterprise) on: workflow_dispatch: - + push: - branches: [ develop ] - + branches: [develop] + pull_request: permissions: {} @@ -15,7 +15,7 @@ jobs: name: Tests (Enterprise) runs-on: macos-26 timeout-minutes: 45 - + # Skip in forks if: ${{ github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository }} @@ -33,19 +33,19 @@ jobs: - name: Setup environment run: source ci_scripts/ci_common.sh && setup_github_actions_environment - + - name: Configure Enterprise run: swift run -q pipeline configure-element-pro - + - name: Run tests run: swift run -q tools ci unit-tests --skip-previews - + - name: Archive artifacts uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 # We only care about artefacts if the tests fail if: failure() with: - name: Results - path: test_output/UnitTests.zip - retention-days: 1 - if-no-files-found: ignore + name: Results + path: test_output/UnitTests.zip + retention-days: 1 + if-no-files-found: ignore diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index da4bc227d..a4e02327d 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -2,10 +2,10 @@ name: Unit Tests on: workflow_dispatch: - + push: - branches: [ develop ] - + branches: [develop] + pull_request: permissions: {}