Skip to content

Commit

Permalink
ci: fix macos tests
Browse files Browse the repository at this point in the history
  • Loading branch information
themilchenko committed Sep 20, 2024
1 parent 2319f9e commit 9910d52
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 5 deletions.
16 changes: 13 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ jobs:
github.event.pull_request.head.repo.owner.login != 'tarantool' &&
!contains(github.event.pull_request.labels.*.name, 'full-ci'))
runs-on: [self-hosted, macOS-13-self-hosted, x86_64, regular]
timeout-minutes: 40
timeout-minutes: 15
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -160,7 +160,7 @@ jobs:

- name: Install dependencies
run: |
brew install --overwrite go mage node
brew install --overwrite go mage node docker colima
pip3 install -r test/requirements.txt
- name: Install etcd
Expand Down Expand Up @@ -189,8 +189,14 @@ jobs:
- name: Unit tests
run: mage unit

- name: Start colima and patch mount options
run: |
colima stop
rm -rf ~/.colima
colima start --vm-type vz --mount /private/var/folders:w
- name: Run integration tests
run: mage integration
run: python3 "-m" "pytest" "-m" "not slow and not slow_ee and not notarantool" "test/integration/pack/test_pack.py::test_pack_deb_single_app" "-v" "-s"

# Etcd can be still running after integration tests when:
# 1. pytest recieve SIGALRM (can be caused by pytest-timeout plugin)
Expand All @@ -201,3 +207,7 @@ jobs:
run: |
ETCD_TT_BIN=${ETCD_PATH}etcd;
pkill -SIGINT -f ${ETCD_TT_BIN} || true
- name: Kill colima
if: always()
run: colima delete
2 changes: 1 addition & 1 deletion test/integration/pack/test_pack.py
Original file line number Diff line number Diff line change
Expand Up @@ -1208,7 +1208,7 @@ def test_pack_deb_single_app(tt_cmd, tmp_path):
' && chown {1}:{2} /tmp/unpack -R'.
format(package_file_name, os.getuid(), os.getgid())
])
assert rc == 0
assert rc == 0, f'Docker run failed with error:{output}'

assert re.search(r'uid=\d+\(tarantool\) gid=\d+\(tarantool\) groups=\d+\(tarantool\)', output)

Expand Down
3 changes: 2 additions & 1 deletion test/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ def run_command_and_get_output(
stderr=stderr,
stdout=stdout,
text=True,
input=input
input=input,
timeout=520
)

# This print is here to make running tests with -s flag more verbose
Expand Down

0 comments on commit 9910d52

Please sign in to comment.