Skip to content

Commit

Permalink
Split tests and linting
Browse files Browse the repository at this point in the history
  • Loading branch information
Joseph-Edwards committed Nov 21, 2024
1 parent faa764d commit 9736cbb
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 15 deletions.
63 changes: 63 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: lint
on: [pull_request, workflow_dispatch]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
ubuntu:
strategy:
fail-fast: false
matrix:
python_version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
runs-on: ubuntu-latest
timeout-minutes: 15
defaults:
run:
shell: bash -l {0}
steps:
- uses: actions/checkout@v4
- name: "Create micromamba environment"
uses: mamba-org/setup-micromamba@v1
with:
environment-name: libsemigroups
create-args: >-
python=${{ matrix.python_version }}
- name: "Python version . . ."
run: |
python --version
pip3 --version
- name: "Pip3 installing pylint + cpplint . . ."
run: |
pip3 install pylint cpplint
- name: "Running pylint and cpplint . . ."
run: |
python -m pylint setup.py tests/*.py libsemigroups_pybind11/*.py
python -m cpplint src/*.hpp src/*.cpp
macosx:
strategy:
fail-fast: false
matrix:
python_version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
runs-on: macOS-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v4
- name: "Create micromamba environment"
uses: mamba-org/setup-micromamba@v1
with:
environment-name: libsemigroups
create-args: >-
python=${{ matrix.python_version }}
- name: "Python version . . ."
run: |
python --version
pip3 --version
- name: "Pip3 installing pylint + cpplint . . ."
run: |
pip3 install pylint cpplint
- name: "Running pylint and cpplint . . ."
run: |
python -m pylint setup.py tests/*.py libsemigroups_pybind11/*.py
python -m cpplint src/*.hpp src/*.cpp
16 changes: 1 addition & 15 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Run tests and lint
name: Run tests
on: [pull_request, workflow_dispatch]

concurrency:
Expand Down Expand Up @@ -62,13 +62,6 @@ jobs:
etc/make-doc.sh # so that all files are generated!
cd docs
python -m sphinx -b doctest -d _build/doctrees source _build/doctest
- name: "Pip3 installing pylint + cpplint . . ."
run: |
pip3 install pylint cpplint
- name: "Running pylint and cpplint . . ."
run: |
python -m pylint setup.py tests/*.py libsemigroups_pybind11/*.py
python -m cpplint src/*.hpp src/*.cpp
macosx:
strategy:
fail-fast: false
Expand Down Expand Up @@ -127,10 +120,3 @@ jobs:
etc/make-doc.sh # so that all files are generated!
cd docs
python -m sphinx -b doctest -d _build/doctrees source _build/doctest
- name: "Pip3 installing pylint + cpplint . . ."
run: |
pip3 install pylint cpplint
- name: "Running pylint and cpplint . . ."
run: |
python -m pylint setup.py tests/*.py libsemigroups_pybind11/*.py
python -m cpplint src/*.hpp src/*.cpp

0 comments on commit 9736cbb

Please sign in to comment.