Skip to content

Commit

Permalink
Merge pull request #115 from esc/ci-upgrade
Browse files Browse the repository at this point in the history
CI Updates
  • Loading branch information
esc authored Apr 30, 2024
2 parents 62ae183 + 7d35436 commit 70c4a0e
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 36 deletions.
37 changes: 7 additions & 30 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,39 +24,16 @@ jobs:
- name: Install dependencies
shell: bash -l {0}
run: |
conda install graphviz python=3.11
pip install pytest pyyaml graphviz coverage
- name: Setup numba_rvsdg
make conda-install
- name: Lint code with pre-commit
shell: bash -l {0}
run: |
pip install -e .
- name: Run pytest and Generate Report
make lint
- name: Install numba_rvsdg with pip
shell: bash -l {0}
run: |
coverage run -m pytest numba_rvsdg/tests/
- name: Display Coverage
make build
- name: Run pytest and print coverage Report
shell: bash -l {0}
run: |
coverage report
pre-commit-hook:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Setup Miniconda
uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: true
auto-activate-base: false

- name: Install dependencies
shell: bash -l {0}
run: |
conda install python=3.11 pre-commit pyyaml graphviz
- name: Run pre-commit
shell: bash -l {0}
run: |
pre-commit run -a
make test
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ repos:
args: ["--py38-plus"]
# Black
- repo: https://github.com/psf/black
rev: 24.4.0
rev: 24.4.2
hooks:
- id: black
language_version: python3
Expand All @@ -35,7 +35,7 @@ repos:
- id: flake8
# Static Type checking: MyPy
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.9.0
rev: v1.10.0
hooks:
- id: mypy
additional_dependencies:
Expand Down
14 changes: 10 additions & 4 deletions makefile
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
.PHONY: build test docs env
.PHONY: build test docs env all
all:
make lint && make build && make test
build:
python -m pip install -vv -e .
test:
pytest --pyargs numba_rvsdg
coverage run -m pytest --pyargs numba_rvsdg
coverage report
lint:
pre-commit run --all-files
pre-commit run --verbose --all-files
docs:
cd docs && make html
conda-env:
conda create -n numba-rvsdg python=3.12 python-graphviz pyyaml pytest sphinx sphinx_rtd_theme
conda create -n numba-rvsdg
conda-install:
conda install python=3.12 python-graphviz pyyaml pytest sphinx sphinx_rtd_theme coverage pre-commit
pip install -U virtualenv # needed newer virtualenv not avail. from anaconda.org at time of writing

0 comments on commit 70c4a0e

Please sign in to comment.