From a26935fd5516206761178b330b9b9867907ee54c Mon Sep 17 00:00:00 2001 From: Thomas Robitaille Date: Wed, 15 May 2024 06:12:31 -0700 Subject: [PATCH] Run benchmarks in quick mode in CI (#119) * Run benchmarks in quick mode in CI to ensure no issues with syntax or code * Run asv machine in CI * Fix Python version * Use tox so as to test with different astropy versions * Simplify CI matrix Co-authored-by: P. L. Lim <2090236+pllim@users.noreply.github.com> * Change 61 -> stable * Test on linux only --------- Co-authored-by: P. L. Lim <2090236+pllim@users.noreply.github.com> --- .github/workflows/main.yml | 14 ++++++++++++++ tox.ini | 23 +++++++++++++++++++++++ 2 files changed, 37 insertions(+) create mode 100644 tox.ini diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 58439813fe..662ae6ecbc 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1 +1,15 @@ name: CI + +on: + pull_request: + push: + tags: + - '*' + +jobs: + test: + uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@v1 + with: + envs: | + - linux: py311-astropystable + - linux: py311-astropydev diff --git a/tox.ini b/tox.ini new file mode 100644 index 0000000000..9728abb853 --- /dev/null +++ b/tox.ini @@ -0,0 +1,23 @@ +[tox] +envlist = + py311-astropy{stable,dev} +isolated_build = True + +[testenv] +skip_install = true +setenv = + PIP_EXTRA_INDEX_URL = https://pypi.anaconda.org/liberfa/simple https://pypi.anaconda.org/astropy/simple +changedir = + .tmp/{envname} +deps = + asv + numpy + scipy + matplotlib + astropystable: astropy + astropydev: astropy>=0.0.dev0 + astropydev: pyerfa>=0.0.dev0 + +commands = + asv machine --machine unknown --os unknown --arch unknown --cpu unknown --ram unknown --config {toxinidir}/asv.conf.json + asv run --quick --python=same --config {toxinidir}/asv.conf.json