Skip to content

Commit 7f53453

Browse files
tests: install coreutils on mac os
1 parent 736dd55 commit 7f53453

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

.github/workflows/test.yml

+19
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,25 @@ jobs:
2424
- name: Checkout
2525
uses: actions/checkout@v3
2626

27+
- name: Brew Install
28+
if: startsWith(matrix.os, 'macos')
29+
run: |
30+
# install system deps
31+
brew update
32+
brew install bash coreutils
33+
34+
# add GNU coreutils to the user PATH
35+
# (see instructions in brew install output)
36+
echo \
37+
"$(brew --prefix)/opt/coreutils/libexec/gnubin" \
38+
>> "${GITHUB_PATH}"
39+
40+
# add coreutils to the bashrc too (for jobs)
41+
cat >> "${HOME}/.bashrc" <<__HERE__
42+
PATH="$(brew --prefix)/opt/coreutils/libexec/gnubin:$PATH"
43+
export PATH
44+
__HERE__
45+
2746
- name: Setup Python
2847
uses: actions/setup-python@v3
2948
with:

0 commit comments

Comments
 (0)