1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141
|
name: Cron
on:
# Trigger on completion of the scheduled_builds.yml file (only on main)
workflow_run:
workflows: [Scheduled build triggerer]
# Manual runs through the web UI and also non-main cron job triggering
workflow_dispatch:
# We also want this workflow triggered if the 'Run cron CI' label is added
# or present when PR is updated
pull_request:
types:
- synchronize
- labeled
# We want this workflow to always run on release branches as well as
# all tags since we want to be really sure we don't introduce
# regressions on the release branches, and it's also important to run
# this on pre-release and release tags.
push:
branches:
- '*.*'
- '!*backport*'
tags:
- 'v*'
- '!*dev*'
- '!*pre*'
- '!*post*'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
cron:
# Run on all triggers other than pull_request unless there's a label
if: (github.event_name != 'pull_request' || contains(github.event.pull_request.labels.*.name, 'Run cron CI'))
uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@main
with:
default_python: '3.12'
submodules: false
coverage: codecov
toxdeps: tox-pypi-filter
envs: |
- linux: py313-minimal-noana
- linux: py314-devdeps-reportlog
libraries:
apt:
- libopenjp2-7
artifact-path: |
.tmp/py314-devdeps-reportlog/pytest-log.jsonl
secrets:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
open-issue:
if: failure() && github.event_name != 'pull_request'
needs: [cron]
runs-on: ubuntu-latest
permissions:
issues: write
steps:
- uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0
with:
name: py314-devdeps-reportlog-(ubuntu-latest)
path: pytest-log
- run: ls -lha pytest-log/
- uses: scientific-python/issue-from-pytest-log-action@558a3dfdd251069b328d3fded994824ddbefc47b # v1.4.0
with:
log-path: pytest-log/pytest-log.jsonl
issue-title: "Cron devdeps build failure"
issue-label: "Infrastructure"
cron-online:
# Run on all triggers other than pull_request unless there's a label
if: (github.event_name != 'pull_request' || contains(github.event.pull_request.labels.*.name, 'Run cron CI'))
uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@main
with:
default_python: '3.12'
submodules: false
coverage: codecov
toxdeps: tox-pypi-filter
libraries: |
apt:
- libopenjp2-7
envs: |
- linux: linkcheck
pytest: false
- linux: py314-devdeps-online
posargs: -m "remote_data"
- windows: py313-online
posargs: -m "remote_data"
secrets:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
conda:
if: (github.event_name != 'pull_request' || contains(github.event.pull_request.labels.*.name, 'Run cron CI'))
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
with:
fetch-depth: 0
lfs: true
- uses: conda-incubator/setup-miniconda@v3
with:
activate-environment: sunpy-test
environment-file: sunpy-dev-env.yml
python-version: "3.13"
- name: Install sunpy
shell: bash -el {0}
run: |
pip install --no-deps --no-build-isolation .
- name: Run test
shell: bash -el {0}
run: |
conda list
cd /tmp
pytest -vvv -r a --pyargs sunpy --cov-report=xml --cov=sunpy --cov-config=$GITHUB_WORKSPACE/pyproject.toml $GITHUB_WORKSPACE/docs -n auto --color=yes
- uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage.xml
notify:
if: always() && (github.event_name == 'workflow_dispatch' || github.event_name == 'workflow_run')
needs: [cron, cron-online, conda]
runs-on: ubuntu-latest
steps:
- uses: Cadair/matrix-notify-action@main
with:
matrix_token: ${{ secrets.matrix_access_token }}
github_token: ${{ secrets.GITHUB_TOKEN }}
homeserver: ${{ secrets.matrix_homeserver }}
roomid: '!JYqfIVJjWANcHnfktY:cadair.com'
ignore_pattern: '.*Load.*'
summarise_success: true
|