summaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
authorTodd Gamblin <gamblin2@llnl.gov>2021-07-27 14:09:17 -0700
committerGitHub <noreply@github.com>2021-07-27 15:09:17 -0600
commitc8efec02957b6381979a952156d8ef64fd792e3a (patch)
treec392f53334531a30180d52d1aba611b5d0e4c813 /.github
parente5bbb6e5b4a1af25dd46101bfc044d04deb10cb5 (diff)
downloadspack-c8efec02957b6381979a952156d8ef64fd792e3a.tar.gz
spack-c8efec02957b6381979a952156d8ef64fd792e3a.tar.bz2
spack-c8efec02957b6381979a952156d8ef64fd792e3a.tar.xz
spack-c8efec02957b6381979a952156d8ef64fd792e3a.zip
`spack style`: add `--root` option (#25085)
This adds a `--root` option so that `spack style` can check style for a spack instance other than its own. We also change the inner workings of `spack style` so that `--config FILE` (and similar options for the various tools) options are used. This ensures that when `spack style` runs, it always uses the config from the running spack, and does *not* pick up configuration from the external root. - [x] add `--root` option to `spack style` - [x] add `--config` (or similar) option when invoking style tools - [x] add a test that verifies we can check an external instance
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/unit_tests.yaml7
1 files changed, 6 insertions, 1 deletions
diff --git a/.github/workflows/unit_tests.yaml b/.github/workflows/unit_tests.yaml
index 9caef56566..32b1baf39a 100644
--- a/.github/workflows/unit_tests.yaml
+++ b/.github/workflows/unit_tests.yaml
@@ -130,7 +130,7 @@ jobs:
sudo apt-get -y update
# Needed for unit tests
sudo apt-get -y install \
- coreutils cvs gfortran graphviz gnupg2 mercurial ninja-build \
+ coreutils cvs gfortran graphviz gnupg2 mercurial ninja-build \
patchelf
# Needed for kcov
sudo apt-get -y install cmake binutils-dev libcurl4-openssl-dev
@@ -138,6 +138,11 @@ jobs:
- name: Install Python packages
run: |
pip install --upgrade pip six setuptools codecov coverage[toml]
+ # ensure style checks are not skipped in unit tests for python >= 3.6
+ # note that true/false (i.e., 1/0) are opposite in conditions in python and bash
+ if python -c 'import sys; sys.exit(not sys.version_info >= (3, 6))'; then
+ pip install --upgrade flake8 isort>=4.3.5 mypy>=0.900 black
+ fi
- name: Setup git configuration
run: |
# Need this for the git tests to succeed.