Skip to content
Snippets Groups Projects
Commit 36a6d2c6 authored by Jonas Haag's avatar Jonas Haag
Browse files

Add macos tests

parent 50e120f7
Branches codeql
No related tags found
No related merge requests found
......@@ -11,7 +11,7 @@ jobs:
timeout-minutes: 20
strategy:
matrix:
os: [ubuntu-latest]
os: [ubuntu-latest, macos-latest]
python-version: ["3.11"]
ctags: [true]
include:
......@@ -23,8 +23,10 @@ jobs:
- uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- run: sudo apt-get update && sudo apt-get install -y exuberant-ctags
if: ${{ matrix.ctags }}
- run: sudo apt-get update && sudo apt-get install -y universal-ctags
if: matrix.ctags && os == 'ubuntu-latest'
- run: brew install universal-ctags
if: matrix.ctags && os == 'macos-latest'
- name: Run tests
run: |
git config --global user.email "you@example.com"
......
......@@ -4,12 +4,13 @@ import shutil
import tempfile
def check_have_exuberant_ctags():
"""Check that the 'ctags' binary is *Exuberant* ctags (not etags etc)"""
def check_have_compatible_ctags():
"""Check that the 'ctags' binary is a compatible ctags (Universal or Exuberant, not etags etc)"""
try:
return b"Exuberant" in subprocess.check_output(
out = subprocess.check_output(
["ctags", "--version"], stderr=subprocess.PIPE
)
return b"Universal" in out or b"Exuberant" in out
except subprocess.CalledProcessError:
return False
......@@ -23,8 +24,8 @@ def create_tagsfile(git_repo_path, git_rev):
:return: path to the generated tagsfile
"""
assert (
check_have_exuberant_ctags()
), "'ctags' binary is missing or not *Exuberant* ctags"
check_have_compatible_ctags()
), "'ctags' binary is missing or not *Universal* (or *Exuberant*) ctags"
_, target_tagsfile = tempfile.mkstemp()
checkout_tmpdir = tempfile.mkdtemp()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment