From 4eb732394c13342c97d7bd4de51a479db74f08b1 Mon Sep 17 00:00:00 2001 From: Andrew Hearin Date: Tue, 30 Jan 2024 06:56:36 -0600 Subject: [PATCH 1/3] Add CI workflow testing if any warnings are raised --- .github/workflows/monthly-warning-test.yml | 61 ++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 .github/workflows/monthly-warning-test.yml diff --git a/.github/workflows/monthly-warning-test.yml b/.github/workflows/monthly-warning-test.yml new file mode 100644 index 0000000..121beec --- /dev/null +++ b/.github/workflows/monthly-warning-test.yml @@ -0,0 +1,61 @@ +name: Test for Warnings + +on: + workflow_dispatch: null + schedule: + # Runs "First of every month at 3:15am Central" + - cron: '15 8 1 * *' + push: + branches: + - main + pull_request: null + +jobs: + tests: + name: tests + runs-on: "ubuntu-latest" + + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + + - uses: conda-incubator/setup-miniconda@v2 + with: + python-version: 3.8 + channels: conda-forge,defaults + channel-priority: strict + show-channel-urls: true + miniforge-version: latest + miniforge-variant: Mambaforge + use-mamba: true + + - name: configure conda and install code + # Test against current main branch of all diff+ dependencies + shell: bash -l {0} + run: | + conda config --set always_yes yes + mamba install --quiet \ + --file=requirements.txt + mamba install -y -q \ + flake8 \ + pytest \ + pytest-xdist \ + pytest-cov \ + pip \ + setuptools \ + "setuptools_scm>=7,<8" \ + python-build + pip uninstall diffmah --yes + pip uninstall diffstar --yes + pip uninstall dsps --yes + pip install --no-deps git+https://github.com/ArgonneCPAC/diffmah.git + pip install --no-deps git+https://github.com/ArgonneCPAC/diffstar.git + pip install --no-deps git+https://github.com/ArgonneCPAC/dsps.git + python -m pip install --no-build-isolation --no-deps -e . + + - name: test that no warnings are raised + shell: bash -l {0} + run: | + export PYTHONWARNINGS=error + pytest -v diffsky --cov --cov-report=xml From 694b0bc6b680bd8602c06f988b519baf0e239a31 Mon Sep 17 00:00:00 2001 From: Andrew Hearin Date: Tue, 30 Jan 2024 06:59:07 -0600 Subject: [PATCH 2/3] Switch to 3.9 in monthly-warning-test --- .github/workflows/monthly-warning-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/monthly-warning-test.yml b/.github/workflows/monthly-warning-test.yml index 121beec..b967c0b 100644 --- a/.github/workflows/monthly-warning-test.yml +++ b/.github/workflows/monthly-warning-test.yml @@ -22,7 +22,7 @@ jobs: - uses: conda-incubator/setup-miniconda@v2 with: - python-version: 3.8 + python-version: 3.9 channels: conda-forge,defaults channel-priority: strict show-channel-urls: true From 6d8826237ded8cd18e34999cb271790f890009ee Mon Sep 17 00:00:00 2001 From: Andrew Hearin Date: Tue, 30 Jan 2024 10:02:27 -0600 Subject: [PATCH 3/3] Remove PR check of deprecation warnings - only test in monthly cron --- .github/workflows/monthly-warning-test.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/monthly-warning-test.yml b/.github/workflows/monthly-warning-test.yml index b967c0b..b78ae95 100644 --- a/.github/workflows/monthly-warning-test.yml +++ b/.github/workflows/monthly-warning-test.yml @@ -5,10 +5,6 @@ on: schedule: # Runs "First of every month at 3:15am Central" - cron: '15 8 1 * *' - push: - branches: - - main - pull_request: null jobs: tests: