Skip to content

Commit

Permalink
Update workflow to support running git commands from tests
Browse files Browse the repository at this point in the history
  • Loading branch information
hampustagerud authored and nicklockwood committed Sep 29, 2023
1 parent 63976c5 commit 6265935
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,18 @@ jobs:
swiftos:
- focal
runs-on: ubuntu-latest
container:
container:
image: ${{ format('{0}-{1}', matrix.swiftver, matrix.swiftos) }}
options: --cap-add=SYS_PTRACE --security-opt seccomp=unconfined --security-opt apparmor=unconfined
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Build and Test
run: swift test --enable-test-discovery
run: |
# Needed to be allowed to run git commands in the tests
# https://github.com/actions/runner-images/issues/6775
git config --global --add safe.directory /__w/SwiftFormat/SwiftFormat
swift test --enable-test-discovery
windows:
strategy:
Expand Down

0 comments on commit 6265935

Please sign in to comment.