Skip to content

Commit

Permalink
Merge main into latest
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] authored Feb 11, 2024
2 parents fc7d167 + 08f78a6 commit 1979519
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 23 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/deployment-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@

# Can only run on push events, not pull requests.
# PRs on github generate weird branch names that semantic-release does not support.
on: [push]

concurrency: # cancel previous workflow run if one exists.
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true


jobs:
deployment:
runs-on: macos-13 # because cocoapods is already installed on these machines
permissions:
contents: write # to set permissions for semantic-release dry-run to pass
steps:
- uses: actions/checkout@v4

- name: setup git user to run semantic-release
run: |
git config --global user.email "[email protected]"
git config --global user.name "Example User"
- uses: ./.github/actions/setup-semantic-release

- name: Run semantic-release in dry run
run: unset GITHUB_ACTIONS && npx semantic-release --dry-run --no-ci --branches "${{ github.ref_name }},main"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }}
27 changes: 7 additions & 20 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
on: [push]
on: [pull_request]

concurrency: # cancel previous workflow run if one exists.
group: ${{ github.workflow }}-${{ github.ref }}
Expand Down Expand Up @@ -29,23 +29,10 @@ jobs:

- run: task test
- run: task coverage

deployment:
runs-on: macos-13 # because cocoapods is already installed on these machines
permissions:
contents: write # to set permissions for semantic-release dry-run to pass
steps:
- uses: actions/checkout@v4

- name: setup git user to run semantic-release
run: |
git config --global user.email "[email protected]"
git config --global user.name "Example User"
- uses: ./.github/actions/setup-semantic-release

- name: Run semantic-release in dry run
run: unset GITHUB_ACTIONS && npx semantic-release --dry-run --no-ci --branches "${{ github.ref_name }},main"
- name: Upload coverage for analysis
uses: coverallsapp/github-action@v2
with:
file: .build/lcov.info
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }}
# try and speedup the action by homebrew not having to do more then it needs when installing the coveralls tool
HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK: true
7 changes: 4 additions & 3 deletions Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,15 @@ tasks:
test:
cmds:
- task: clean
- xcodebuild -scheme Wendy -destination 'platform=iOS Simulator,name=iPhone 15' -derivedDataPath .build/derivedData -resultBundlePath './Wendy.xcresult' -enableCodeCoverage YES test | xcbeautify
- xcodebuild -scheme Wendy -destination 'platform=iOS Simulator,name=iPhone 15' -derivedDataPath .build/derivedData -enableCodeCoverage YES build-for-testing | xcbeautify
- xcodebuild -scheme Wendy -destination 'platform=iOS Simulator,name=iPhone 15' -derivedDataPath .build/derivedData -enableCodeCoverage YES test-without-building | xcbeautify

# Resourced used to create this command:
# https://github.com/michaelhenry/swifty-code-coverage/
coverage:
preconditions:
- test -d .build/
cmds:
- xcrun llvm-cov export "$(find .build -name WendyTests.xctest | tail -n1)/WendyTests" -format=lcov -instr-profile=$(find .build -name *.profdata | tail -n1) > .build/lcov.info
- xcrun llvm-cov report "$(find .build -name WendyTests.xctest | tail -n1)/WendyTests" -instr-profile=$(find .build -name *.profdata | tail -n1) -use-color
- xcrun llvm-cov export "$(find .build -name WendyTests.xctest | tail -n1)/WendyTests" -instr-profile=$(find .build -name *.profdata | tail -n1) -ignore-filename-regex=Tests/* -format=lcov > .build/lcov.info
- xcrun llvm-cov report "$(find .build -name WendyTests.xctest | tail -n1)/WendyTests" -instr-profile=$(find .build -name *.profdata | tail -n1) -ignore-filename-regex=Tests/* -use-color

0 comments on commit 1979519

Please sign in to comment.