| 1 |
name: test latest on downstream projects |
| 2 |
on: |
| 3 |
push: |
| 4 |
branches: |
| 5 |
- main |
| 6 |
# a dedicated branch for working on this workflow |
| 7 |
- downstream-test |
| 8 |
# build weekly at 4:00 AM UTC |
| 9 |
schedule: |
| 10 |
- cron: '0 4 * * 1' |
| 11 |
workflow_dispatch: |
| 12 |
|
| 13 |
jobs: |
| 14 |
build: |
| 15 |
runs-on: ubuntu-latest |
| 16 |
steps: |
| 17 |
- uses: actions/checkout@v6 |
| 18 |
- uses: actions/setup-python@v6 |
| 19 |
with: |
| 20 |
python-version: "3.x" |
| 21 |
- run: python -m pip install tox |
| 22 |
- name: build |
| 23 |
run: make build |
| 24 |
- name: upload latest builds |
| 25 |
uses: actions/upload-artifact@v6 |
| 26 |
with: |
| 27 |
name: latest-build |
| 28 |
path: dist/* |
| 29 |
|
| 30 |
test-mailman: |
| 31 |
strategy: |
| 32 |
matrix: |
| 33 |
pkg-extension: ["whl", "tar.gz"] |
| 34 |
needs: build |
| 35 |
runs-on: ubuntu-latest |
| 36 |
steps: |
| 37 |
- run: git clone "https://gitlab.com/mailman/mailman/" . |
| 38 |
- name: download sdist build |
| 39 |
uses: actions/download-artifact@v7 |
| 40 |
with: |
| 41 |
name: latest-build |
| 42 |
path: nose2-build |
| 43 |
# NOTE: be sure to use a python version supported by mailman tests |
| 44 |
# at time of writing, this can be seen in the mailman test matrix: |
| 45 |
# https://gitlab.com/mailman/mailman/-/blob/master/tox.ini |
| 46 |
- uses: actions/setup-python@v6 |
| 47 |
with: |
| 48 |
python-version: "3.11" |
| 49 |
- run: python -m pip install tox |
| 50 |
- name: setup testenv |
| 51 |
run: tox -e py-nocov --devenv testenv |
| 52 |
- name: install nose2 latest build |
| 53 |
run: | |
| 54 |
source testenv/bin/activate |
| 55 |
pip install --force-reinstall -v ./nose2-build/*.${{ matrix.pkg-extension }} |
| 56 |
- name: run tests |
| 57 |
run: | |
| 58 |
source testenv/bin/activate |
| 59 |
python -m nose2 -v |