File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11name : CI
22
33on :
4- # This runs in the context of the base of the pull request,
5- # rather than in the context of the merge commit.
6- # Maintainers must approve and we tighten permissions below.
7- pull_request_target :
4+ pull_request :
85 types : [opened, synchronize, reopened]
6+ push :
7+ branches : [main]
8+ workflow_dispatch :
99
1010permissions :
1111 contents : read
1212
1313jobs :
1414 test :
15- name : Test
15+ name : Test (macOS)
16+ # The reusable workflow consumes secrets,
17+ # which are not available to fork PRs.
18+ # Limit this job to trusted, same-repo PRs.
19+ if : ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository }}
1620 uses : huggingface/hf-workflows/.github/workflows/swift_transformers_unit_tests.yml@main
1721 with :
1822 # Use the PR merge ref, not the head.
@@ -42,11 +46,11 @@ jobs:
4246 - name : Run tests
4347 env :
4448 CI_DISABLE_NETWORK_MONITOR : " 1"
45- HF_TOKEN : ${{ secrets.HF_HUB_READ_TOKEN }}
4649 # Skip test targets that use URLSession on Linux due to a
4750 # FoundationNetworking race condition that crashes during teardown.
4851 # See: https://github.com/swiftlang/swift-corelibs-foundation/issues/3675
49- run : swift test --skip HubTests --skip TokenizersTests
52+ run : |
53+ swift test --skip HubTests --skip TokenizersTests
5054 lint :
5155 name : Lint
5256 runs-on : macos-latest
You can’t perform that action at this time.
0 commit comments