Skip to content

Commit 393e998

Browse files
authored
chore: update the test action (#9)
1 parent a371499 commit 393e998

2 files changed

Lines changed: 34 additions & 45 deletions

File tree

.github/workflows/ci.yml

Lines changed: 24 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ on:
44
push:
55
branches:
66
- main
7-
- dev
87
pull_request:
98
paths:
109
- '.swiftlint.yml'
@@ -13,18 +12,18 @@ on:
1312
- "Source/**"
1413
- "Tests/**"
1514

15+
permissions:
16+
contents: read
17+
18+
concurrency:
19+
group: overlay-container-${{ github.head_ref }}
20+
cancel-in-progress: true
21+
22+
env:
23+
SCHEME_NAME: "overlay-container"
24+
1625
jobs:
17-
SwiftLint:
18-
runs-on: ubuntu-latest
19-
steps:
20-
- uses: actions/checkout@v3
21-
- name: GitHub Action for SwiftLint
22-
uses: norio-nomura/action-swiftlint@3.2.1
23-
with:
24-
args: --strict
25-
env:
26-
DIFF_BASE: ${{ github.base_ref }}
27-
iOS:
26+
test-apple-platforms:
2827
name: ${{ matrix.name }}
2928
runs-on: ${{ matrix.runsOn }}
3029
env:
@@ -34,32 +33,18 @@ jobs:
3433
fail-fast: false
3534
matrix:
3635
include:
37-
- destination: "OS=17.0.1,name=iPhone 14 Pro"
38-
name: "iOS 17.0.1"
39-
xcode: "Xcode_15.0"
40-
runsOn: macos-13
41-
- destination: "OS=16.4,name=iPhone 14 Pro"
42-
name: "iOS 16.4"
43-
xcode: "Xcode_14.3.1"
44-
runsOn: macos-13
45-
steps:
46-
- uses: actions/checkout@v3
47-
- name: ${{ matrix.name }}
48-
run: xcodebuild test -scheme "overlay-container" -destination "${{ matrix.destination }}" clean -enableCodeCoverage YES -resultBundlePath "test_output/${{ matrix.name }}.xcresult" || exit 1
49-
- uses: actions/upload-artifact@v4
50-
with:
51-
name: ${{ matrix.name }}
52-
path: test_output
53-
discover-typos:
54-
name: Discover Typos
55-
runs-on: macOS-13
56-
env:
57-
DEVELOPER_DIR: /Applications/Xcode_14.1.app/Contents/Developer
36+
# iOS
37+
- { 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" }
38+
- { platform: iOS, name: "iOS 18.1", xcode: "Xcode_16.1", runsOn: macOS-14, destination: "OS=18.1,name=iPhone 16 Pro" }
39+
- { platform: iOS, name: "iOS 17.4", xcode: "Xcode_15.3", runsOn: macOS-14, destination: "OS=17.4,name=iPhone 15 Pro" }
5840
steps:
59-
- uses: actions/checkout@v2
60-
- name: Discover typos
41+
- name: Checkout code
42+
uses: actions/checkout@v6
43+
- name: Run tests - ${{ matrix.name }}
6144
run: |
62-
export PATH="$PATH:/Library/Frameworks/Python.framework/Versions/3.11/bin"
63-
python3 -m pip install --upgrade pip
64-
python3 -m pip install codespell
65-
codespell --ignore-words-list="hart,inout,msdos,sur" --skip="./.build/*,./.git/*"
45+
xcodebuild test \
46+
-scheme "${{ env.SCHEME_NAME }}" \
47+
-destination "${{ matrix.destination }}" \
48+
-enableCodeCoverage YES \
49+
-resultBundlePath "test_output/${{ matrix.name }}.xcresult" \
50+
clean || exit 1

.github/workflows/danger.yml

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Danger
1+
name: danger
22

33
on:
44
pull_request:
@@ -8,24 +8,28 @@ env:
88
LC_CTYPE: en_US.UTF-8
99
LANG: en_US.UTF-8
1010

11+
permissions:
12+
contents: read
13+
pull-requests: write
14+
1115
jobs:
1216
run-danger:
1317
runs-on: ubuntu-latest
1418
steps:
1519
- name: ruby setup
1620
uses: ruby/setup-ruby@v1
1721
with:
18-
ruby-version: 3.1.4
22+
ruby-version: 4.0.1
1923
bundler-cache: true
2024
- name: Checkout code
21-
uses: actions/checkout@v2
25+
uses: actions/checkout@v6
2226
- name: Setup gems
2327
run: |
2428
gem install bundler
25-
bundle install --clean --path vendor/bundle
29+
bundle config set clean true
30+
bundle config set path 'vendor/bundle'
31+
bundle install
2632
- name: danger
2733
env:
28-
2934
DANGER_GITHUB_API_TOKEN: ${{ secrets.DANGER_GITHUB_API_TOKEN }}
30-
3135
run: bundle exec danger --verbose

0 commit comments

Comments
 (0)