summaryrefslogtreecommitdiff
path: root/.github/workflows/unit_tests.yaml
AgeCommit message (Collapse)AuthorFilesLines
2022-07-20Pin setuptools version in Github Action Workflows (#31118)Massimiliano Culpo1-1/+1
fixes #31109
2022-04-27build(deps): bump actions/checkout from 2 to 3.0.2 (#30235)dependabot[bot]1-9/+9
Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 3.0.2. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v2...2541b1294d2704b0964813337f33b291d3f8596b) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-04-27build(deps): bump codecov/codecov-action from 3.0.0 to 3.1.0 (#30234)dependabot[bot]1-5/+5
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 3.0.0 to 3.1.0. - [Release notes](https://github.com/codecov/codecov-action/releases) - [Changelog](https://github.com/codecov/codecov-action/blob/master/CHANGELOG.md) - [Commits](https://github.com/codecov/codecov-action/compare/e3c560433a6cc60aec8812599b7844a7b4fa0d71...81cd2dc8148241f03f5839d295e000b8f761e378) --- updated-dependencies: - dependency-name: codecov/codecov-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-04-14build(deps): bump actions/setup-python from 3.1.1 to 3.1.2 (#30017)dependabot[bot]1-7/+7
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 3.1.1 to 3.1.2. - [Release notes](https://github.com/actions/setup-python/releases) - [Commits](https://github.com/actions/setup-python/compare/21c0493ecfd34b1217f0a90ec19a327f3cc0a048...98f2ad02fd48d057ee3b4d4f66525b231c3e52b6) --- updated-dependencies: - dependency-name: actions/setup-python dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-04-13Add support for Python 3.10 (#29581)Massimiliano Culpo1-6/+6
* Add support for Python 3.10 * Update unit-tests to use 3.10 * Update Getting started section of the docs * Update bootstrap action
2022-04-11build(deps): bump actions/setup-python from 3.1.0 to 3.1.1 (#29956)dependabot[bot]1-7/+7
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 3.1.0 to 3.1.1. - [Release notes](https://github.com/actions/setup-python/releases) - [Commits](https://github.com/actions/setup-python/compare/9c644ca2ab8e57ea0a487b5ec2f8290740378bfd...21c0493ecfd34b1217f0a90ec19a327f3cc0a048) --- updated-dependencies: - dependency-name: actions/setup-python dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-04-06build(deps): bump codecov/codecov-action from 2.1.0 to 3 (#29908)dependabot[bot]1-5/+5
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 2.1.0 to 3. - [Release notes](https://github.com/codecov/codecov-action/releases) - [Changelog](https://github.com/codecov/codecov-action/blob/master/CHANGELOG.md) - [Commits](https://github.com/codecov/codecov-action/compare/f32b3a3741e1053eb607407145bc9619351dc93b...e3c560433a6cc60aec8812599b7844a7b4fa0d71) --- updated-dependencies: - dependency-name: codecov/codecov-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-04-04build(deps): bump actions/setup-python from 2 to 3.1.0 (#29843)dependabot[bot]1-7/+7
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 2 to 3.1.0. - [Release notes](https://github.com/actions/setup-python/releases) - [Commits](https://github.com/actions/setup-python/compare/v2...9c644ca2ab8e57ea0a487b5ec2f8290740378bfd) --- updated-dependencies: - dependency-name: actions/setup-python dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-03build(deps): bump actions/setup-python from 2.3.1 to 3 (#29253)dependabot[bot]1-7/+7
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 2.3.1 to 3. - [Release notes](https://github.com/actions/setup-python/releases) - [Commits](https://github.com/actions/setup-python/compare/f38219332975fe8f9c04cca981d674bf22aea1d3...0ebf233433c08fb9061af664d501c3f3ff0e9e20) --- updated-dependencies: - dependency-name: actions/setup-python dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-03build(deps): bump actions/checkout from 2 to 3 (#29276)dependabot[bot]1-9/+9
Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 3. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v2...a12a3943b4bdde767164f792f33f40b04645d846) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-02-08CI: pin the version of pathlib to v2.3.6 (#28832)Massimiliano Culpo1-0/+4
2022-01-28Update actions/setup-python to latest version (#28634)Massimiliano Culpo1-7/+7
2022-01-27Pin the version of "coverage" in CI to 6.2 (#28638)Massimiliano Culpo1-5/+5
Hotfix for coverage v6.3 blocking our CI workflows
2021-12-23Reduce the unit tests jobs for the original concretizerMassimiliano Culpo1-1/+8
Only test Python 2.7, 3.6 and 3.9
2021-12-13Add a CI job to audit all the packages in the built-in repository (#27945)Massimiliano Culpo1-0/+29
* Add a CI job to audit all the packages in the built-in repository * flecsi: fixed typo for dependency on legion * py-pythonqwt: fix a typo in variant name * sollve: removed a conflict with a non-existing variant * acts: fixed use of wrong variant in dd4hep Also removed duplicated variant declaration in dd4hep * aoflagger: update variant of a dependency Issues introduced indirectly in #22925 * camellia: removed unused variant Issue introduced indirectly in #26150 * cbtf-*: remove cti variants and dependency on mrnet+cti Issue introduced in #14178 * flecsale: update variants to match flecsi Issue introduced in #11679 * grnboost: fixed issue with non-existing variant in a dependency This package possibly never worked since #8763 * nalu: fixed issue with non-existing variant in a dependency * open-iscsi: fixed issue with non-existing variant in a dependency * openspeedshop-*: remove use of non-existing mrnet+cti variant * percept: fixed issue with non-existing variant in a dependency * phyluce: fixed issue with non-existing variant in a dependency Issue introduced in #12952 * phyluce: fixed issue with non-existing variant in a dependency Issue introduced in #22340
2021-11-23Remove support for Python 2.6 (#27256)Massimiliano Culpo1-35/+2
Modifications: - [x] Removed `centos:6` unit test, adjusted vermin checks - [x] Removed backport of `collections.OrderedDict` - [x] Removed backport of `functools.total_ordering` - [x] Removed Python 2.6 specific skip markers in unit tests - [x] Fixed a few minor Python 2.6 related TODOs in code Updating the vendored dependencies will be done in separate PRs
2021-11-18Allow recent pytest versions to be used with Spack (#25371)Massimiliano Culpo1-4/+4
Currently Spack vendors `pytest` at a version which is three major versions behind the latest (3.2.5 vs. 6.2.4). We do that since v3.2.5 is the latest version supporting Python 2.6. Remaining so much behind the currently supported versions though might introduce some incompatibilities and is surely a technical debt. This PR modifies Spack to: - Use the vendored `pytest@3.2.5` only as a fallback solution, if the Python interpreter used for Spack doesn't provide a newer one - Be able to parse `pytest --collect-only` in all the different output formats from v3.2.5 to v6.2.4 and use it consistently for `spack unit-test --list-*` - Updating the unit tests in Github Actions to use a more recent `pytest` version
2021-11-18ci: run style unit tests only if we target develop (#27472)Harmen Stoppels1-0/+2
Some tests assume the base branch is develop, but this branch may not have been checked out.
2021-11-03build(deps): bump actions/checkout from 2.3.5 to 2.4.0 (#27179)dependabot[bot]1-8/+8
Bumps [actions/checkout](https://github.com/actions/checkout) from 2.3.5 to 2.4.0. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/1e204e9a9253d643386038d443f96446fa156a97...ec3a7ce113134d7a93b817d10a8272cb61118579) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-11-02build(deps): bump actions/checkout from 2.3.4 to 2.3.5 (#27135)dependabot[bot]1-8/+8
Bumps [actions/checkout](https://github.com/actions/checkout) from 2.3.4 to 2.3.5. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f...1e204e9a9253d643386038d443f96446fa156a97) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-11-01Pin actions to a commit sha instead of tag (#26538)Harmen Stoppels1-19/+19
2021-10-27Remove documentation tests from GitHub Actions (#26981)Massimiliano Culpo1-26/+6
We moved documentation tests to readthedocs since a while, so remove the one on GitHub.
2021-10-22Remove hard-coded repository in centos6 unit test (#26885)Harmen Stoppels1-4/+4
This makes it easier to run tests in a fork.
2021-09-15build(deps): bump codecov/codecov-action from 2.0.3 to 2.1.0 (#25925)dependabot[bot]1-4/+4
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 2.0.3 to 2.1.0. - [Release notes](https://github.com/codecov/codecov-action/releases) - [Changelog](https://github.com/codecov/codecov-action/blob/master/CHANGELOG.md) - [Commits](https://github.com/codecov/codecov-action/compare/v2.0.3...v2.1.0) --- updated-dependencies: - dependency-name: codecov/codecov-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-09-14Make clingo the default solver (#25502)Massimiliano Culpo1-2/+5
Modifications: - [x] Change `defaults/config.yaml` - [x] Add a fix for bootstrapping patchelf from sources if `compilers.yaml` is empty - [x] Make `SPACK_TEST_SOLVER=clingo` the default for unit-tests - [x] Fix package failures in the e4s pipeline Caveats: 1. CentOS 6 still uses the original concretizer as it can't connect to the buildcache due to issues with `ssl` (bootstrapping from sources requires a C++14 capable compiler) 1. I had to update the image tag for GitlabCI in e699f14. 1. libtool v2.4.2 has been deprecated and other packages received some update
2021-08-30build(deps): bump codecov/codecov-action from 2.0.2 to 2.0.3 (#25594)dependabot[bot]1-4/+4
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 2.0.2 to 2.0.3. - [Release notes](https://github.com/codecov/codecov-action/releases) - [Changelog](https://github.com/codecov/codecov-action/blob/master/CHANGELOG.md) - [Commits](https://github.com/codecov/codecov-action/compare/v2.0.2...v2.0.3) --- updated-dependencies: - dependency-name: codecov/codecov-action dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-08-27Make `SpecBuildInterface` pickleable (#25628)Massimiliano Culpo1-0/+4
* Add a __reduce__ method to SpecBuildInterface This class was confusing pickle when being serialized, due to its scary nature of being an object that disguise as another type. * Add more MacOS tests, switch them to clingo * Fix condition syntax * Remove Python v3.6 and v3.9 with macOS
2021-08-19Use kcov from official Ubuntu 20.04 repository (#25385)Massimiliano Culpo1-45/+3
* Ubuntu 20.04 provides kcov, so don't build from source * Use two undocumented options for kcov v3.8
2021-08-18Bootstrap clingo from binaries (#22720)Massimiliano Culpo1-2/+2
* Bootstrap clingo from binaries * Move information on clingo binaries to a JSON file * Add support to bootstrap on Cray Bootstrapping on Cray requires, at the moment, to swap the platform when looking for binaries - due to #22800. * Add SHA256 verification for bootstrapped software Use sha256 verification for binaries necessary to bootstrap the concretizer and gpg for signature verification * patchelf: use Spec._old_concretize() to bootstrap As noted in #24450 we may happen to need the concretizer when bootstrapping clingo. In that case only the old concretizer is available. * Add a schema for bootstrapping methods Two fields have been added to bootstrap.yaml: "sources" which lists the methods available for bootstrapping software "trusted" which records if a source is trusted or not A subcommand has been added to "spack bootstrap" to list the sources currently available. * Methods used for bootstrapping are configurable from bootstrap:sources The function that tries to ensure a given Python module is importable now tries bootstrapping methods in the same order as they are defined in `bootstrap.yaml` * Permit to trust/untrust bootstrapping methods * Add binary tests for MacOS, Ubuntu * Add documentation * Add a note on bash
2021-07-27`spack style`: add `--root` option (#25085)Todd Gamblin1-1/+6
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
2021-07-24`spack style`: automatically bootstrap dependenciesvsoch1-2/+1
This uses our bootstrapping logic to automatically install dependencies for `spack style`. Users should no longer have to pre-install all of the tools (`isort`, `mypy`, `black`, `flake8`). The command will do it for them. - [x] add logic to bootstrap specs with specific version requirements in `spack style` - [x] remove style tools from CI requirements (to ensure we test bootstrapping) - [x] rework dependencies for `mypy` and `py-typed-ast` - `py-typed-ast` needs to be a link dependency - it needs to be at 1.4.1 or higher to work with python 3.9 Signed-off-by: vsoch <vsoch@users.noreply.github.com>
2021-07-24Bump codecov/action to v2.0.2 (#24983)Massimiliano Culpo1-5/+8
* build(deps): bump codecov/codecov-action from 1 to 2.0.1 Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 1 to 2.0.1. - [Release notes](https://github.com/codecov/codecov-action/releases) - [Changelog](https://github.com/codecov/codecov-action/blob/master/CHANGELOG.md) - [Commits](https://github.com/codecov/codecov-action/compare/v1...v2.0.1) --- updated-dependencies: - dependency-name: codecov/codecov-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> * Update arguments to codecov action * Try to delete the symbolic link to root folder Hopefully this should get rid of the ELOOP error * Delete also for shell tests and MacOS * Bump to v2.0.2 Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-07-09coverage: move config from `.coveragerc` to `pyproject.toml`Todd Gamblin1-4/+4
Getting rid of another top-level file. `coverage.py` has supported `pyproject.toml` since version 5.0, and all versions of coverage so far work with python 2.7. We just need to ensure that a version of coverage with the `toml` extra is installed in the test environment. I tested this with `coverage run`, `coverage report`, and `coverage html`.
2021-07-09mypy: move configuration to pyproject.toml (#24802)Todd Gamblin1-2/+2
This moves our `mypy` configuration from `.mypy.ini` to `.pyproject.toml` and increases the minimum `mypy` version in the tests. - [x] move `mypy` configuration to `pyproject.toml` - [x] remove `.mypy.ini` - [x] ensure that `mypy` version .900 or higher is used in tests
2021-07-08imports: sort imports everywhere in Spack (#24695)Todd Gamblin1-1/+1
* fix remaining flake8 errors * imports: sort imports everywhere in Spack We enabled import order checking in #23947, but fixing things manually drives people crazy. This used `spack style --fix --all` from #24071 to automatically sort everything in Spack so PR submitters won't have to deal with it. This should go in after #24071, as it assumes we're using `isort`, not `flake8-import-order` to order things. `isort` seems to be more flexible and allows `llnl` mports to be in their own group before `spack` ones, so this seems like a good switch.
2021-07-07cvs tests: don't use dateutil at allTodd Gamblin1-6/+5
`dateutil.parser` was an optional dependency for CVS tests. It was failing on macOS beacuse the dateutil types were not being installed, and mypy was failing *even when the CVS tests were skipped*. This seems like it was an oversight on macOS -- `types-dateutil-parser` was not installed there, though it was on Linux unit tests. It takes 6 lines of YAML and some weird test-skipping logic to get `python-dateutil` and `types-python-dateutil` installed in all the tests where we need them, but it only takes 4 lines of code to write the date parser we need for CVS, so I just did that instead. Note that CVS date format can vary from system to system, but it seems like it's always pretty similar for the parts we care about. - [x] Replace dateutil.parser with a simpler date regex - [x] Lose the dependency on `dateutil.parser`
2021-07-07style: Move isort configuration to pyproject.tomlTodd Gamblin1-2/+2
- [x] Remove flake8-import-order checks, as we only need isort for this - [x] Clean up configuration and requirements
2021-07-07style: add support for `isort` and `--fix`Danny McClanahan1-2/+2
2021-06-29vermin: show line numbers of violations (#24580)Massimiliano Culpo1-2/+2
This commit runs vermin with the --violations option that shows details of the violations to target requirements.
2021-06-28Use flake8-import-order to enforce PEP-8 compliance (#23947)Adam J. Stewart1-2/+2
2021-06-23Fix broken CI for package only PRs, make dateutil not strictly required (#24484)Massimiliano Culpo1-0/+4
* Force the Python interpreter with an env variable This commit forces the Python interpreter with an environment variable, to ensure that the Python set by the "setup-python" action is the one being used. Due to the policy adopted by Spack to prefer python3 over python we may end up picking a Python 3.X interpreter where Python 2.7 was meant to be used. * Revert "Update conftest.py (#24473)" This reverts commit 477c8ce8205ec149fa897c9d83e530815c978d8b. * Make python-dateutil a soft dependency for unit tests Before #23212 people could clone spack and run ``` spack unit-tests ``` while now this is not possible, since python-dateutil is a required but not vendored dependency. This change makes it not a hard requirement, i.e. it will be used if found in the current interpreter. * Workaround mypy complaint
2021-06-22Implement CVS fetcher (#23212)Erik Schnetter1-10/+13
Spack packages can now fetch versions from CVS repositories. Note this fetch mechanism is unsafe unless using :extssh:. Most public CVS repositories use an insecure protocol implemented as part of CVS.
2021-06-08mypy: add types-six to the list of installed packages (#24207)Massimiliano Culpo1-1/+1
See https://mypy-lang.blogspot.com/2021/05/the-upcoming-switch-to-modular-typeshed.html for a broader explanation.
2021-05-22Spack can Use RHEL8's `platform-python` if nothing else is available. (#23857)Todd Gamblin1-2/+0
This adds RHEL8's `/usr/libexec/platform-python` to Spack's list of preferred pythons. It will only be used if no other `python` is available in the `PATH`. We have been testing with this python for a while now, and it seems to do all that we need. If Spack one day isn't able to work with it, we'll take it out, but for now it is useful to allow Spack to be used on RHEL8 without a dedicated `python` installation.
2021-04-22qa: install clingo-cffi from pip (#23163)Massimiliano Culpo1-23/+54
Clingo has been released on PyPI, so there are no more concerns on our CI depending on pypy.test for installing the wheel. Apparently we have parts of Spack which are not compatible with kcov > 3.4
2021-03-20QA: reduce number of unit tests for jobs not in the matrix (#22426)Massimiliano Culpo1-7/+28
* QA: reduce number of unit tests for jobs not in the matrix * Fixup for CentOS6 dependencies * Put correct conditions back in place * Add dependency on changes
2021-03-19CI: treat push to develop in the same way as PRs (#22421)Massimiliano Culpo1-5/+3
2021-03-19CI: drastically reduce the number of tests for package only PRs (#22410)Massimiliano Culpo1-1/+1
PRs that change only package recipes will only run tests under "package_sanity.py" and without coverage. This should result in a huge drop the cpu-time spent in CI for most PRs.
2021-03-16The action to detect changes needs a repository to be checked out on push ↵Massimiliano Culpo1-0/+4
event (#22324)
2021-03-16Speed-up CI by reorganizing tests (#22247)Massimiliano Culpo1-0/+337
* unit tests: mark slow tests as "maybeslow" This commit also removes the "network" marker and marks every "network" test as "maybeslow". Tests marked as db are maintained, but they're not slow anymore. * GA: require style tests to pass before running unit-tests * GA: make MacOS unit tests fail fast * GA: move all unit tests into the same workflow, run style tests as a prerequisite All the unit tests have been moved into the same workflow so that a single run of the dorny/paths-filter action can be used to ask for coverage based on the files that have been changed in a PR. The basic idea is that for PRs that introduce only changes to packages coverage is not necessary, this resulting in a faster execution of the tests. Also, for package only PRs slow unit tests are skipped. Finally, MacOS and linux unit tests are now conditional on style tests passing meaning that e.g. we won't waste a MacOS worker if we know that the PR has flake8 issues. * Addressed review comments * Skipping slow tests on MacOS for package only recipes * QA: make tests on changes correct before merging