-
Notifications
You must be signed in to change notification settings - Fork 0
92 lines (78 loc) · 2.67 KB
/
main.yml
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
#This file is part of mpunittest, a parallel unittest runner.
#Copyright (C) 2023 Maximilian Pilz
#
#This program is free software; you can redistribute it and/or
#modify it under the terms of the GNU General Public License
#as published by the Free Software Foundation; version 2.
#
#This program is distributed in the hope that it will be useful,
#but WITHOUT ANY WARRANTY; without even the implied warranty of
#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
#GNU General Public License for more details.
#
#You should have received a copy of the GNU General Public License
#along with this program; if not, write to the Free Software
#Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
name: main
on:
push:
branches:
- 'main'
jobs:
hatch-build:
timeout-minutes: 5
runs-on: ubuntu-latest
outputs:
output1: ${{ steps.filenames.outputs.whl }}
output2: ${{ steps.filenames.outputs.targz }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: upgrade pip
run: python -m pip install --no-cache-dir --upgrade pip
- name: install Hatch
run: python -m pip install --no-cache-dir hatch twine
- name: pip check
run: python -m pip check
- name: hatch build
run: python -m hatch build
- name: twine check
run: python -m twine check dist/*
- name: set filenames in output
id: filenames
run: |
echo "whl=$(echo dist/*.whl)" >> $GITHUB_OUTPUT
echo "targz=$(echo dist/*.tar.gz)" >> $GITHUB_OUTPUT
- name: archive distributions
uses: actions/upload-artifact@v3
with:
name: distributions
path: dist
retention-days: 5
test-distributions:
timeout-minutes: 10
needs: hatch-build
strategy:
matrix:
python_version: [ '3.8', '3.9', '3.10', '3.11' ]
os: [ macos-latest, ubuntu-latest, windows-latest ]
distribution: [ "${{ needs.hatch-build.outputs.output1 }}",
"${{ needs.hatch-build.outputs.output2 }}" ]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python_version }}
- name: download distributions
uses: actions/download-artifact@v3
with:
name: distributions
path: dist
- name: install package
run: python -m pip install ${{ matrix.distribution }}
- name: run unit tests
run: |
python -m mpunittest.tests.real.testrunner
python -m mpunittest.tests.real.testcomm