diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 24f7bbe..3582d90 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -4,7 +4,6 @@ on: push: branches: - main - - dev pull_request: paths: - '.swiftlint.yml' @@ -13,18 +12,18 @@ on: - "Source/**" - "Tests/**" +permissions: + contents: read + +concurrency: + group: overlay-container-${{ github.head_ref }} + cancel-in-progress: true + +env: + SCHEME_NAME: "overlay-container" + jobs: - SwiftLint: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - name: GitHub Action for SwiftLint - uses: norio-nomura/action-swiftlint@3.2.1 - with: - args: --strict - env: - DIFF_BASE: ${{ github.base_ref }} - iOS: + test-apple-platforms: name: ${{ matrix.name }} runs-on: ${{ matrix.runsOn }} env: @@ -34,32 +33,18 @@ jobs: fail-fast: false matrix: include: - - destination: "OS=17.0.1,name=iPhone 14 Pro" - name: "iOS 17.0.1" - xcode: "Xcode_15.0" - runsOn: macos-13 - - destination: "OS=16.4,name=iPhone 14 Pro" - name: "iOS 16.4" - xcode: "Xcode_14.3.1" - runsOn: macos-13 - steps: - - uses: actions/checkout@v3 - - name: ${{ matrix.name }} - run: xcodebuild test -scheme "overlay-container" -destination "${{ matrix.destination }}" clean -enableCodeCoverage YES -resultBundlePath "test_output/${{ matrix.name }}.xcresult" || exit 1 - - uses: actions/upload-artifact@v4 - with: - name: ${{ matrix.name }} - path: test_output - discover-typos: - name: Discover Typos - runs-on: macOS-13 - env: - DEVELOPER_DIR: /Applications/Xcode_14.1.app/Contents/Developer + # iOS + - { platform: iOS, name: "iOS 26.0, Xcode 26.0, Swift 6.2.0", xcode: "Xcode_26.0.1", runsOn: macOS-26, destination: "OS=26.0.1,name=iPhone 17 Pro" } + - { platform: iOS, name: "iOS 18.1", xcode: "Xcode_16.1", runsOn: macOS-14, destination: "OS=18.1,name=iPhone 16 Pro" } + - { platform: iOS, name: "iOS 17.4", xcode: "Xcode_15.3", runsOn: macOS-14, destination: "OS=17.4,name=iPhone 15 Pro" } steps: - - uses: actions/checkout@v2 - - name: Discover typos + - name: Checkout code + uses: actions/checkout@v6 + - name: Run tests - ${{ matrix.name }} run: | - export PATH="$PATH:/Library/Frameworks/Python.framework/Versions/3.11/bin" - python3 -m pip install --upgrade pip - python3 -m pip install codespell - codespell --ignore-words-list="hart,inout,msdos,sur" --skip="./.build/*,./.git/*" + xcodebuild test \ + -scheme "${{ env.SCHEME_NAME }}" \ + -destination "${{ matrix.destination }}" \ + -enableCodeCoverage YES \ + -resultBundlePath "test_output/${{ matrix.name }}.xcresult" \ + clean || exit 1 \ No newline at end of file diff --git a/.github/workflows/danger.yml b/.github/workflows/danger.yml index 3f63d38..b033ff7 100644 --- a/.github/workflows/danger.yml +++ b/.github/workflows/danger.yml @@ -1,4 +1,4 @@ -name: Danger +name: danger on: pull_request: @@ -8,6 +8,10 @@ env: LC_CTYPE: en_US.UTF-8 LANG: en_US.UTF-8 +permissions: + contents: read + pull-requests: write + jobs: run-danger: runs-on: ubuntu-latest @@ -15,17 +19,17 @@ jobs: - name: ruby setup uses: ruby/setup-ruby@v1 with: - ruby-version: 3.1.4 + ruby-version: 4.0.1 bundler-cache: true - name: Checkout code - uses: actions/checkout@v2 + uses: actions/checkout@v6 - name: Setup gems run: | gem install bundler - bundle install --clean --path vendor/bundle + bundle config set clean true + bundle config set path 'vendor/bundle' + bundle install - name: danger env: - DANGER_GITHUB_API_TOKEN: ${{ secrets.DANGER_GITHUB_API_TOKEN }} - run: bundle exec danger --verbose \ No newline at end of file