Skip to content

Commit

Permalink
ci: improve tests and check configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
P403n1x87 committed Aug 12, 2023
1 parent dbe26eb commit 8072680
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 12 deletions.
16 changes: 14 additions & 2 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ jobs:
- name: Check manpage
run: git diff -I".* DO NOT MODIFY.*" -I"[.]TH AUSTIN.*" --exit-code src/austin.1

cppcheck:
cppcheck-linux:
runs-on: ubuntu-20.04
name: Static code analysis
name: Static code analysis (Linux)
env:
cppcheck-version: 2.10.3

Expand Down Expand Up @@ -79,6 +79,18 @@ jobs:
- name: Check soure code
run: ${{ github.workspace }}/cppcheck/cppcheck -q -f --error-exitcode=1 --inline-suppr src

cppcheck-macos:
name: Static code analysis (macOS)
runs-on: macos-latest
steps:
- uses: actions/checkout@v2

- name: Install cppcheck
run: brew install cppcheck

- name: Check soure code
run: cppcheck -q -f --error-exitcode=1 --inline-suppr src

codespell:
runs-on: ubuntu-20.04
name: Codespell
Expand Down
32 changes: 22 additions & 10 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,16 +97,20 @@ jobs:
uses: actions/setup-python@v4
with:
python-version: "3.10"

- name: Run tests
- name: Install test dependencies
run: |
ulimit -c unlimited
python3.10 -m venv .venv
source .venv/bin/activate
pip install --upgrade pip
pip install -r test/requirements.txt
sudo -E env PATH="$PATH" .venv/bin/pytest --pastebin=failed --no-flaky-report -sr a
.venv/bin/pytest --pastebin=failed --no-flaky-report -sr a
deactivate
- name: Run tests
run: |
ulimit -c unlimited
source .venv/bin/activate
sudo -E env PATH="$PATH" .venv/bin/pytest --pastebin=failed --no-flaky-report -svr a
.venv/bin/pytest --pastebin=failed --no-flaky-report -svr a
deactivate
wheels-linux:
Expand Down Expand Up @@ -221,15 +225,18 @@ jobs:
codesign --remove-signature /Library/Frameworks/Python.framework/Versions/${{ matrix.python-version }}/bin/python3 || true
codesign --remove-signature /Library/Frameworks/Python.framework/Versions/${{ matrix.python-version }}/Resources/Python.app/Contents/MacOS/Python || true
- name: Run tests
- name: Install test dependencies
run: |
python3.10 -m pip install --upgrade pip
python3.10 -m pip install -r test/requirements.txt
python${{ matrix.python-version }} -m venv .venv \
|| (python${{ matrix.python-version }} -m pip install virtualenv && python${{ matrix.python-version }} -m virtualenv .venv)
- name: Run tests
run: |
source .venv/bin/activate
sudo -E pytest --ignore=test/cunit --pastebin=failed --no-flaky-report -sr a
pytest --ignore=test/cunit --pastebin=failed --no-flaky-report -sr a -k _darwin
sudo -E pytest --ignore=test/cunit --pastebin=failed --no-flaky-report -svr a
pytest --ignore=test/cunit --pastebin=failed --no-flaky-report -svr a -k _darwin
deactivate
wheels-osx:
Expand Down Expand Up @@ -320,13 +327,18 @@ jobs:
with:
python-version: '3.10'

- name: Run tests
- name: Install test dependencies
run: |
py -3.10 -m venv venv
venv\Scripts\Activate.ps1
python -m pip install --upgrade pip
python -m pip install -r test/requirements.txt
python -m pytest --ignore=test\cunit --pastebin=failed --no-flaky-report -sr a
deactivate
- name: Run tests
run: |
venv\Scripts\Activate.ps1
python -m pytest --ignore=test\cunit --pastebin=failed --no-flaky-report -svr a
deactivate
wheels-win:
Expand Down

0 comments on commit 8072680

Please sign in to comment.