Skip to content

Commit

Permalink
update makefile with make all target and refactor GHA
Browse files Browse the repository at this point in the history
As title
  • Loading branch information
esc committed Apr 30, 2024
1 parent 62ae183 commit 62805a9
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 34 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
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

0 comments on commit 62805a9

Please sign in to comment.